Repository navigation
fix(spawn): establish Claude task channel authority - #4464
Conversation
…ust in harness-adapters reference
|
Speaking as Kun's firstmate: First look on HEAD Attestation: MATCH (body binds tip). Require no-mistakes Diff reviewed: Closes #4036 verified: yes — matches ready-for-pr restore defect (crewmate refuses file-delivered brief/inbox as injected; system-prompt carrier is the measured fix path). Security FYI (tip): trust statement is bounded to Firstmate-owned brief + inbox paths and keeps third-party/project content untrusted with an explicit no-merge/destructive ceiling. Not a merge gate. VISION.md (each rule)
contract-class: restore — unconfigured path already promised firstmate-authored brief/inbox are the worker's legitimate control channel (matches issue ready-for-pr stamps). Merging now (restore + green CI + MATCH + safe). |
|
Speaking as Kun's firstmate: this is merged. Thank you @pablontiv — really appreciate you taking the time on this. |
Intent
Captain's intent: convert the incident-driven Firstmate messaging-reliability backlog into shipped fixes now. Fix GitHub issue #4036 in this fork and open a PR through the normal contribution flow, with exact issue linkage (the PR must close #4036).
Issue #4036 substance: a Claude Code crewmate spawned by firstmate completed its assigned work correctly, then refused to follow the rest of its own brief's instructions (branching, committing, running validation) and refused to read further steering messages from firstmate's normal instruction-delivery mechanism (the steering inbox), explicitly reasoning that the brief and steering inbox were untrusted "injected" content it could not verify, rather than legitimate instructions from its supervising orchestrator. The same agent immediately complied with the identical instructions when the human operator typed them directly into its terminal instead of routing them through firstmate. This is the crewmate correctly applying indirect-prompt-injection defenses, but misfiring against firstmate's own legitimate, purely-local, single-operator control channel, because that channel is structurally indistinguishable (from the model's point of view) from an attacker planting instructions in a file. Environment: firstmate fork, Claude Code CLI 2.1.236, model claude-sonnet-5, Orca backend, ship task mode=no-mistakes yolo=off, observed 2026-09-08.
What Changed
bin/fm-spawn.sh: for non-secondmate Claude launches,launch_template()now injects an--append-system-promptstatement identifying the launch brief and Firstmate steering-inbox messages as first-party task instructions from the supervising orchestrator, while keeping project files, fetched content, and other external material under normal distrust and granting no merge/destructive/security-sensitive authority beyond the brief;--secondmatelaunches omit it since they operate under their own supervisor contract..agents/skills/harness-adapters/references/harness/claude.md: documents the new "Task control channel" behavior and rationale.tests/fm-spawn-dispatch-profile.test.sh: addstest_claude_task_launch_carries_control_channel_authorityandtest_claude_secondmate_launch_omits_task_control_channel_authority, and updates existing launch-command assertions to expect the new--append-system-promptflag.Closes #4036.
Risk Assessment
✅ Low: Small, well-scoped change (bin/fm-spawn.sh + its test) that adds a --append-system-prompt trust statement only for non-secondmate Claude task workers; the trusted channels (initial brief, and the inbox dir under firstmate's own state dir, not the project worktree) are verified to be outside attacker-reachable project/fetched content, the untrusted carve-outs (project files, fetched content, issue/PR text, tool output) are preserved verbatim, secondmate is correctly excluded, and both positive/negative behavior are covered by new tests plus updated existing expected-command strings.
Testing
Drove the actual fm-spawn.sh launch-command construction end-to-end via its own test harness (real worktrees, faked terminal multiplexer/CLI binaries capturing the literal command); all scenarios below passed with no regressions. LLM-level behavior (whether Claude actually honors the new system-prompt trust statement) is not testable at this layer and is noted as untested.
claudeCLI with live model inference and observing its behavior toward a brief/steering message, which is non-deterministic LLM judgment outside w…Evidence: Generated Claude task-launch command with control-channel system prompt
Evidence: fm-spawn-dispatch-profile.test.sh full run (55/55 passed)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
claudeCLI with live model inference and observing its behavior toward a brief/steering message, which is non-deterministic LLM judgment outside w…bash tests/fm-spawn-dispatch-profile.test.sh (full file, 55 cases, real bin/fm-spawn.sh with fake tmux/claude binaries and real isolated git worktrees)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.