Skip to content

feat(tools): run well-formed first calls to deferred tools - #6437

Open
Hmbown wants to merge 1 commit into
mainfrom
feat/deferred-first-call-executes
Open

Hmbown wants to merge 1 commit into
mainfrom
feat/deferred-first-call-executes

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 23, 2026

Copy link
Copy Markdown
Owner

No-Issue: 0.10.1 release-readiness recovery and first-call tool work, found in dogfooding; no public issue tracks it.

Deferred tools kept every unused schema out of the pinned prefix, but a
deferred tool's first call never ran: it returned the schema and told
the model to retry, so ordinary investigation (list_dir, grep_files,
Web fetch, Run) spent a turn plus a tool-surface re-pin before doing
anything. Children and Workflow leaves also started with none of the
tools their assignment named explicitly.

  • Parent and child: a first call that already matches the unseen schema
    (object, every required field, no undeclared field) executes and
    activates at the catalog tail. Malformed calls still get the schema.
    Hydration runs after every authority gate (deny/allow lists, Plan,
    repo law, approval), and dispatch still requires a registry spec, so
    this changes turn cost, not authority. The executed path emits a
    tool.deferred_first_use_executed audit record.
  • Children warm their explicit allowed_tools onto the first request
    through the existing bounded activation cache (8 names / 16 KiB).
    Visibility only: grants, role posture and envelopes are unchanged.

Known limitation: argument types are left to each tool's own validation.

Evidence: 60 passed, 0 failed (13,192 skipped) across deferred,
small_surface, tool_catalog, hydrat and tool_search selections,
including a Scout whose well-formed first list_dir runs, whose
malformed call gets the schema, and whose write/edit stay refused. Two
tests that encoded the old never-execute behavior now use malformed
input to keep covering the schema-hint path. TUI all-target/all-feature
Clippy with CI flags and fmt passed.

🤖 Generated with Claude Code

Deferred tools kept every unused schema out of the pinned prefix, but a
deferred tool's first call never ran: it returned the schema and told
the model to retry, so ordinary investigation (list_dir, grep_files,
Web fetch, Run) spent a turn plus a tool-surface re-pin before doing
anything. Children and Workflow leaves also started with none of the
tools their assignment named explicitly.

- Parent and child: a first call that already matches the unseen schema
  (object, every required field, no undeclared field) executes and
  activates at the catalog tail. Malformed calls still get the schema.
  Hydration runs after every authority gate (deny/allow lists, Plan,
  repo law, approval), and dispatch still requires a registry spec, so
  this changes turn cost, not authority. The executed path emits a
  `tool.deferred_first_use_executed` audit record.
- Children warm their explicit `allowed_tools` onto the first request
  through the existing bounded activation cache (8 names / 16 KiB).
  Visibility only: grants, role posture and envelopes are unchanged.

Known limitation: argument types are left to each tool's own validation.

Evidence: 60 passed, 0 failed (13,192 skipped) across deferred,
small_surface, tool_catalog, hydrat and tool_search selections,
including a Scout whose well-formed first list_dir runs, whose
malformed call gets the schema, and whose write/edit stay refused. Two
tests that encoded the old never-execute behavior now use malformed
input to keep covering the schema-hint path. TUI all-target/all-feature
Clippy with CI flags and fmt passed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 23, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants