Skip to content

Requires-tools preflight for worker dispatch - #1224

Open
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-9476-requires-tools
Open

TheGreatAxios wants to merge 1 commit into
mainfrom
cl-9476-requires-tools

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Verifies a worker's hard tool requirements pre-spawn and fails closed with a reroute hint.

  • spawn_agent accepts requires_tools (canonical names); the dispatcher runs a capability preflight against the worker's capability mount before any session, telemetry, or worktree exists. Rejections return a reroute hint naming a capable director/profile.
  • run.ts re-checks stamped requires_tools against the mounted tools at run start; a tool missing in between fails as stale_snapshot (setup_error, non-continuable).
  • Session records stamp requiresTools + snapshotRevision; profiles.ts exposes load diagnostics (revision + malformed files) additive over loadAgentProfiles.
  • wait_agents documents preflight rejections and stale_snapshot failures as failed without the continuable marker.

Reroute hint: a preflight rejection names the missing tool and a capable reroute target — re-dispatch deliberately against that target, never auto-retry or spawn a speculative successor.
Non-continuable semantics: preflight rejections and mount-time stale_snapshot failures are terminal setup failures, not transient provider errors; they carry no continuable marker and must not be re-waited, retried, or continued.

Fixes CL-9476

@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown

CL-9476

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.

1 participant