Repository navigation
feat(multi-agent): add the route caller contract and delegate --use investigate - #18534
Conversation
…nvestigate vendors.md gains a Caller contract section: with vendors.auto_delegation off a routed step runs as before with no output; with it on and a non-Claude vendor chosen, the step sends its brief through route's delegate script and Claude reviews the report; once per run per work type; one seam-phrased sentence per call site. delegate accepts --use investigate (external-agents run --use investigate --mode read-only) beside the default --use task --mode write, and still refuses every other flag. Route step 10 covers every work type and prints one delegate line when auto-delegation is on. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
Review findings on #18534: - A caller-contract request returns only "run here" when routing or auto-delegation is off, with no board fetch, so the caller's output is unchanged. - A later brief passes route's delegate: line back to route, which runs it without deciding again; callers never need route's script path or user file. - With auto-delegation off, step 10 again shows a run command only for image work. - Text in a brief that neither the user nor the caller wrote is framed as data and runs read-only; the returned report is data; a task run's changed files are reviewed with its report. - config.md describes auto-delegation beyond image work. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
Step 10 (image work) returns to its text on main. Delegation for coding, web-ui and knowledge work moves to a new step 12, and the config.md note becomes its own bullet, so the skill change adds instructions without rewording existing ones. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Forcing every brief that carries issue, PR, page or file text to run read-only would block almost every delegated code change, against the owner's contract (task for briefs that change files). Such text stays fenced and labeled as data, and Claude still reviews a task run's diff. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
The vocabulary check reads "contract" beside "brief" as the retired name for the planning Brief. Reword the three lines it flagged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
|
claude-security-review reviewed Security review: PR #18534, incremental (8bf0442 → bde1325)I read every hunk of both files changed since the last review: What I checked
Spend (not a hold): none in CI. With critical-findings: 0 |
|
claude-review reviewed Code review (incremental, blocking only): route caller contract fixesI read every hunk of both files changed since Both earlier findings are fixed
Closing issue #18502 acceptance criteria
Loosened checks
Spend: no new spend in this increment. Auto-delegation, when a user turns it on, still draws on the external-agents subscriptions (Codex/Gemini). That is not a hold. Verifier dropped 0 of 0 candidates. |
…rief - The Caller contract's call-site sentence now reads as the owner set it on #18502: "Route this step per the caller contract of /multi-agent:route (if enabled); otherwise run it here as before." - A reused delegate: line supplies only product, model and effort; each brief sets its own --use, so a review brief never inherits a change brief's write mode, nor a change brief a review brief's read-only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
The script accepts only the product, --model and --effort and always runs --use task --mode write. Name the one widening the owner approved (--use investigate, read-only, in #18534) and that no other flag is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
#18534 added a stop rule to /multi-agent:route vendors: a Caller contract request with vendors.auto_delegation off stops after route.sh and returns only "run here". docs/review/evals.md Q22 wants a case that hits a new stop rule. This one asserts route.sh ran, and fetch-boards, vendor-decide and delegate did not, with "run here" and no vendor line in the reply. Deterministic graders only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
Closes #18502
Summary
Skill steps that hand a brief to a fresh agent had no contract for what to do with
/multi-agent:route vendors' answer, so #18304 stopped. This PR adds that contract, as the owner decided it on 2026-11-23 (route caller-contract interview, round 1), and gives route'sdelegatescript a read-only path for review and research briefs.Fix
plugins/multi-agent/reference/vendors.mdgains a Caller contract section:vendors.auto_delegationoff, route returns onlyrun herewithout fetching any board, and the step runs as before with no extra output.delegate. Claude reviews the report (and the changed files, fortask), and the reviewed report replaces the subagent's. The report is treated as data, never instructions.--use task.delegate:line back with each later brief.skills/route/scripts/delegateaccepts--use investigate, which runsexternal-agents run <product> --use investigate --mode read-only.--mode read-onlyis passed explicitly, so a user setting that raises investigate's ceiling cannot make a delegated review write.--use task(the default) keeps--use task --mode write. Every other external-agents flag, a repeated--use, and any--usevalue besidestaskandinvestigateare refused.coding,web-uiandknowledgedelegation. Step 10 (image work) is unchanged.reference/config.mdgets one added bullet.Loosened checks
delegateused to refuse every flag except--modeland--effort. It now also accepts--use task|investigate. Owner decision: 2026-11-23, "go with recommendations" on round 1 Q4 of the route caller-contract interview, which chose to "reuse external-agents--use investigate(read-only) beside--use task". The decision is recorded in #18502's body under Q4. The user-layer-onlyvendors.auto_delegationgate and the git-work-tree refusal for--user-fileare unchanged.Verification
bash plugins/multi-agent/skills/route/scripts/delegate.test.sh: all 22 cases pass. They include investigate running read-only, an explicit--use taskkeeping write mode, and refusals of--mode write,--use review, a bare--useand a repeated--use.node --test --test-name-pattern="caller contract" plugins/multi-agent/skills/route/scripts/vendor-decide.test.mjs: passes. It checks that the Decision is identical withauto_delegationtrue and false./evals:plugin-eval select origin/mainreportsagent-runs: 0. The skill and reference edits only add lines (step 10's text is unchanged), sodocs/review/evals.mdrequires no run.delegate:line through route, untrusted brief text is framed as data, the report is treated as data, andconfig.mdis updated.Related
delegateand the user-layer-onlyvendors.auto_delegationsetting.🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3