actorA message reaches the running turn at once, and a stop ends the harness turn
spec:cc-agents.steering-and-stopPacks: none
Design: no design entries · no pinned declarations · no decisions
Findings: no errors, no warnings
specs/runner/steering-and-stop.sdp.md
No open questions and no blocking questions; implementation binding present, verifier binding present, and expected-outcome oracle none.
Intent
- A user or lead agent steering or stopping a foreign agent.
problem- Claude Code delivers a message to a subagent at a step boundary, and a stop aborts the step whose own calls are aborted with it, so neither would reach the harness reliably.
outcome- A message goes to the harness turn as it arrives, and a stop, from any route, ends the harness turn and gives its capacity back.
value- Steering a foreign agent feels like steering a Claude one, and a stopped agent leaves nothing running in a group the guard recorded.
Behavior
rule.steerNowline 27 ·specs/runner/steering-and-stop.sdp.md:27- A message sent to a running agent of this plugin, by id or by name, is passed to its harness turn at once, and a message to any other recipient is delivered by Claude Code.
no example exercises it
rule.typedMessageline 28 ·specs/runner/steering-and-stop.sdp.md:28- A message typed into the agent's own view is passed to the running turn at the next step, and one the ended turn cannot take waits for a new turn.
no example exercises it
rule.earlySteerWaitsline 29 ·specs/runner/steering-and-stop.sdp.md:29- A message that arrives before the harness has taken the turn is held by the sidecar and sent right after the turn starts, and once the turn has ended there is nothing to steer.
no example exercises it
rule.stopEndsTurnline 30 ·specs/runner/steering-and-stop.sdp.md:30- A stop of the agent ends the harness turn too: the mod asks the sidecar to interrupt it from the turn-complete hook, because the aborted step cannot do it reliably.
no example exercises it
rule.leaseNetline 31 ·specs/runner/steering-and-stop.sdp.md:31- A turn whose events nobody has read within the lease, 90 seconds by default, is interrupted by the sidecar.
no example exercises it
rule.noProcessLeftBehindline 32 ·specs/runner/steering-and-stop.sdp.md:32- An interrupted turn leaves no process behind in the harness's group or in a group the guard recorded; the limit of that guarantee is spec:cc-agents.work-containment#question.detachedBeforeScan.
no example exercises it
rule.stopBeforeFirstStepline 33 ·specs/runner/steering-and-stop.sdp.md:33- An agent stopped before its first turn gives back the slot reserved for it.
no example exercises it
0 unkeyed rules.
Verification
Verifier bindings
- test:cc-agents.mod-suite · the mod against a scripted sidecar · anchored · test anchor binding present ·
plugin/tests/mod.test.ts:4 - test:cc-agents.sidecar-suite · the sidecar, the Codex adapter, the slots and the guard against a fake Codex app-server · anchored · test anchor binding present ·
tests/sidecar.test.mjs:4
Design view
Requirement drawing
- Declared verifying examples: no declared verifying example.
The diagram as text
- spec:cc-agents.steering-and-stop: A message reaches the running turn at once, and a stop ends the harness turn · declared Spec
- spec:cc-agents.runner: Other model families run as real Claude Code agents · declared Spec
- impl:cc-agents.mod: answers each step of an agent from the sidecar's events, hands back the exact answer, steers and stops, and returns the job state block · anchored code ·
plugin/hooks/register.js:9 - impl:cc-agents.sidecar: the per-session sidecar: owns each harness turn, its events and its slot, and drives every adapter through the contract · anchored code ·
plugin/sidecar/server.mjs:12 - test:cc-agents.mod-suite: the mod against a scripted sidecar · anchored test binding · binding present ·
plugin/tests/mod.test.ts:4 - test:cc-agents.sidecar-suite: the sidecar, the Codex adapter, the slots and the guard against a fake Codex app-server · anchored test binding · binding present ·
tests/sidecar.test.mjs:4 - spec:cc-agents.steering-and-stop refines spec:cc-agents.runner · declared
- impl:cc-agents.mod satisfies spec:cc-agents.steering-and-stop · anchored
- impl:cc-agents.sidecar satisfies spec:cc-agents.steering-and-stop · anchored
- test:cc-agents.mod-suite verifies spec:cc-agents.steering-and-stop · anchored
- test:cc-agents.sidecar-suite verifies spec:cc-agents.steering-and-stop · anchored
Mermaid source
Copyable source; the Studio draws static SVG.
Preferred and chosen syntax: requirementDiagram; exact refines, satisfies and verifies, with claim words in nodes and per-edge comments.
Decisions
No decision record named.
Runtime
impl:cc-agents.mod· answers each step of an agent from the sidecar's events, hands back the exact answer, steers and stops, and returns the job state block ·plugin/hooks/register.js:9Uses
None.
impl:cc-agents.sidecar· the per-session sidecar: owns each harness turn, its events and its slot, and drives every adapter through the contract ·plugin/sidecar/server.mjs:12Uses
None.
Runtime observation: not tracked.
Evidence
Runtime observation: not tracked.
Build attestations: not tracked.
Deployments: not tracked.
Bills of materials: not tracked.
Impact
The diagram as text
- spec:cc-agents.mod-layer: The mod answers an agent's steps from the sidecar and never calls a model
- spec:cc-agents.runner: Other model families run as real Claude Code agents
- spec:cc-agents.sidecar: One sidecar per Claude session owns the session's harness turns
- spec:cc-agents.steering-and-stop: A message reaches the running turn at once, and a stop ends the harness turn
- spec:cc-agents.work-containment: A guard ends the groups a harness turn started and it has seen, even when the sidecar is killed
- spec:cc-agents.steering-and-stop dependsOn spec:cc-agents.mod-layer · declared — steering and stopping are hooks of the mod
- spec:cc-agents.steering-and-stop dependsOn spec:cc-agents.sidecar · declared — the sidecar holds the running turn that a message reaches
- spec:cc-agents.steering-and-stop dependsOn spec:cc-agents.work-containment · declared — what an interrupted turn leaves running is bounded by the groups the guard recorded
- spec:cc-agents.steering-and-stop refines spec:cc-agents.runner · declared
Mermaid source
Copyable source; the Studio draws static SVG.
Preferred syntax: flowchart. Chosen syntax: labelled flowchart, preserving exact relations, claims and folds.
Rests on
- refines · spec:cc-agents.runner · stated defined, floor ready
- dependsOn · spec:cc-agents.mod-layer · stated ready, floor ready
- dependsOn · spec:cc-agents.sidecar · stated ready, floor ready
- dependsOn · spec:cc-agents.work-containment · stated ready, floor ready
Rested on by
No Spec rests on this Spec.
Relations
| Relation and direction | Other end | Claim | Reason | Exercised keys |
|---|---|---|---|---|
| dependsOn · outgoing | The mod answers an agent's steps from the sidecar and never calls a modelspec:cc-agents.mod-layer · resolves | declared | steering and stopping are hooks of the mod | None |
| dependsOn · outgoing | One sidecar per Claude session owns the session's harness turnsspec:cc-agents.sidecar · resolves | declared | the sidecar holds the running turn that a message reaches | None |
| dependsOn · outgoing | A guard ends the groups a harness turn started and it has seen, even when the sidecar is killedspec:cc-agents.work-containment · resolves | declared | what an interrupted turn leaves running is bounded by the groups the guard recorded | None |
| refines · outgoing | Other model families run as real Claude Code agentsspec:cc-agents.runner · resolves | declared | None | None |
Bindings
Implementation binding: present
impl:cc-agents.mod· answers each step of an agent from the sidecar's events, hands back the exact answer, steers and stops, and returns the job state block ·plugin/hooks/register.js:9impl:cc-agents.sidecar· the per-session sidecar: owns each harness turn, its events and its slot, and drives every adapter through the contract ·plugin/sidecar/server.mjs:12
Design reference: none
Verifier binding: present
- test:cc-agents.mod-suite · the mod against a scripted sidecar · anchored ·
plugin/tests/mod.test.ts:4· test anchor - test:cc-agents.sidecar-suite · the sidecar, the Codex adapter, the slots and the guard against a fake Codex app-server · anchored ·
tests/sidecar.test.mjs:4· test anchor
Expected-outcome oracle: none
Runtime observation: not tracked.
Run results: not recorded in the graph.
Findings
None.
Composing (0)
Composing needs the script.