Skip to content

supervise: preflight declared coordination tool names before admitting a root #1219

Description

@drewstone

Problem

A profile declares coordination tools by name in profile.tools (for example agent_runtime_coordination_await_event: true). A name that the run's coordination server does not serve is only discovered when the root first reaches for it. On a sandbox-placed root that is after a sandbox is born and a model turn has started, and several downstream runs have died in under 30 ms on exactly this class of error once a turn began.

There is no exported way to ask, before admission, "will this run's coordination server serve every tool this profile declares?" Some verbs are served by Runtime itself (spawn_worker, await_event, observe_agent, read_journal, steer_agent, stop), while others come from registrations supplied by the caller's runtime options (knowledge verbs from agent-knowledge, caller-registered verbs). So a static check against Runtime's own source cannot answer it.

Proposed change

Give supervise (or a small exported helper next to it) a declaration-only preflight that:

  1. Assembles the coordination server exactly as the run would, including caller registrations, without placing any backend.
  2. Lists the tools it would serve.
  3. Refuses admission with a typed error naming every declared agent_runtime_coordination_* tool that is not served, and every served tool the profile marks true that the backend cannot attach.

It should cost no sandbox and no model call. It should be reachable from a caller that only has the profile, the task and the runtime options.

Why at the owner

Callers can approximate this today by starting a real run with a stub provider that POSTs tools/list to the attached coordination MCP server and then throws. That works, but it runs the full admission path to learn a fact the coordination server already knows. Every caller re-implementing it will drift from the served set.

Done when

  • The preflight exists and is exported.
  • A run whose profile declares an unserved coordination tool is refused before any backend create call, and the error lists the missing names.
  • A run whose declared names are all served passes with no backend call.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions