Fix the settlement snippet in the os-sdlc settling-agent charters #501

Closed
opened 2026-08-24 19:51:33 +00:00 by jared · 4 comments
Owner

Context

The charters of the eleven settling agents (ADR-0144) document settlement as echo '{"dispatch_id": N, "content": "..."}' | os-sdlc-runner subagent-stop. Observed live (2026-08-24, session 95ef4099, change-interpreter on #492): (a) the runner rejects the payload — it requires session_id and agent_type too (exit 3); (b) the echo-pipe form corrupts escaped newlines in the JSON under zsh; (c) the compound pipe trips the worktree-isolation guard for isolated subagents. Verified working form: printf the payload to an absolute-path temp file, run os-sdlc-runner subagent-stop < file as a separate command, remove the file.

Tasks

  • Correct the settlement snippet in every settling-agent charter under plugins/os-sdlc/agents/ (all eleven per ADR-0144): full payload fields (session_id, agent_type, dispatch_id, content) and the printf-to-file + stdin-redirect form.
  • Check the shared charter fragments/blueprints so a regenerated charter does not reintroduce the echo-pipe form.

Acceptance criteria

  • A dispatched agent following its charter verbatim settles on the first attempt from inside a worktree-isolated session.

Skeptic verdict: CREATE (live-observed defect, charter text is the root; sonnet-5 gauntlet, this session).

Origin

  • Trigger: /os-sdlc:implement 492 — change-interpreter dispatch 39, settlement attempts failed exit 3 before the temp-file workaround.
  • Improvised this session: agent settled via printf-to-file + stdin redirect; retry prompt for dispatch 40 carried the corrected recipe inline.
  • Chain: settlement failures ← charter snippet omits required fields and uses echo-pipe ← DESIGN (charter text written for the pre-#496 subagent-stop payload shape; plugins/os-sdlc/agents/change-interpreter.md).
  • Root candidate: this ticket.
## Context The charters of the eleven settling agents (ADR-0144) document settlement as `echo '{"dispatch_id": N, "content": "..."}' | os-sdlc-runner subagent-stop`. Observed live (2026-08-24, session 95ef4099, change-interpreter on #492): (a) the runner rejects the payload — it requires session_id and agent_type too (exit 3); (b) the echo-pipe form corrupts escaped newlines in the JSON under zsh; (c) the compound pipe trips the worktree-isolation guard for isolated subagents. Verified working form: printf the payload to an absolute-path temp file, run `os-sdlc-runner subagent-stop < file` as a separate command, remove the file. ## Tasks - [ ] Correct the settlement snippet in every settling-agent charter under plugins/os-sdlc/agents/ (all eleven per ADR-0144): full payload fields (session_id, agent_type, dispatch_id, content) and the printf-to-file + stdin-redirect form. - [ ] Check the shared charter fragments/blueprints so a regenerated charter does not reintroduce the echo-pipe form. ## Acceptance criteria - [ ] A dispatched agent following its charter verbatim settles on the first attempt from inside a worktree-isolated session. Skeptic verdict: CREATE (live-observed defect, charter text is the root; sonnet-5 gauntlet, this session). ## Origin - Trigger: /os-sdlc:implement 492 — change-interpreter dispatch 39, settlement attempts failed exit 3 before the temp-file workaround. - Improvised this session: agent settled via printf-to-file + stdin redirect; retry prompt for dispatch 40 carried the corrected recipe inline. - Chain: settlement failures ← charter snippet omits required fields and uses echo-pipe ← DESIGN (charter text written for the pre-#496 subagent-stop payload shape; plugins/os-sdlc/agents/change-interpreter.md). - Root candidate: this ticket.
Author
Owner

Probe correction before implementation (2026-08-24): the runner does NOT require all four payload fields. Exit 3 at round_commands.rb:29-31 fires on a JSON parse error (the zsh echo-pipe corrupting the payload), and completion_intake.rb:186-227 resolves a dispatch via EITHER dispatch_id OR session_id+agent_type — alternate lookup paths, not jointly required fields. The error message merely names session_id/agent_type, which is what got read as 'required'. The charter fix will still include all four fields for robustness, but will state that dispatch_id alone resolves. Also verified: no shared fragment/blueprint exists — the eleven charter files are the only sources of the snippet.

Probe correction before implementation (2026-08-24): the runner does NOT require all four payload fields. Exit 3 at round_commands.rb:29-31 fires on a JSON parse error (the zsh echo-pipe corrupting the payload), and completion_intake.rb:186-227 resolves a dispatch via EITHER dispatch_id OR session_id+agent_type — alternate lookup paths, not jointly required fields. The error message merely names session_id/agent_type, which is what got read as 'required'. The charter fix will still include all four fields for robustness, but will state that dispatch_id alone resolves. Also verified: no shared fragment/blueprint exists — the eleven charter files are the only sources of the snippet.
Author
Owner

Work started 2026-08-24: rewriting settlement snippet in all eleven charters + exit-3 message, direct on main.

Work started 2026-08-24: rewriting settlement snippet in all eleven charters + exit-3 message, direct on main.
Author
Owner

Resolution

Done: All eleven settling-agent charters rewritten to printf-to-file + stdin-redirect settlement with full payload fields (echo-pipe removed); exit-3 message in round_commands.rb corrected to name the real cause (JSON parse failure, dispatch_id OR session_id+agent_type resolution)

Evidence: Commit 32e7c7c on main: 11 charters + round_commands.rb (144 insertions); verified no shared fragment/blueprint can reintroduce the echo-pipe form; bin/refresh-plugins run; suite green except pre-existing baseline; probe correction posted as ticket comment

Follow-ups: Regression test pinning the snippet wording considered and dropped as low-value doc-drift guard. Otherwise none.

Needs review: Acceptance criterion — a dispatched agent following its charter verbatim settles first-try from a worktree-isolated session — needs one live dispatch; the planned #492 replay session doubles as this verification

## Resolution **Done:** All eleven settling-agent charters rewritten to printf-to-file + stdin-redirect settlement with full payload fields (echo-pipe removed); exit-3 message in round_commands.rb corrected to name the real cause (JSON parse failure, dispatch_id OR session_id+agent_type resolution) **Evidence:** Commit 32e7c7c on main: 11 charters + round_commands.rb (144 insertions); verified no shared fragment/blueprint can reintroduce the echo-pipe form; bin/refresh-plugins run; suite green except pre-existing baseline; probe correction posted as ticket comment **Follow-ups:** Regression test pinning the snippet wording considered and dropped as low-value doc-drift guard. Otherwise none. Needs review: Acceptance criterion — a dispatched agent following its charter verbatim settles first-try from a worktree-isolated session — needs one live dispatch; the planned #492 replay session doubles as this verification
Author
Owner

Resolution

Done: > This was generated by AI during triage. Closing as implemented.

Evidence: Commit 32e7c7c (2026-08-24) rewrote all eleven settling-agent charters (plugins/os-sdlc/agents/*.md) to use 'os-sdlc-runner subagent-stop < /tmp/handoff-.json' (e.g. change-interpreter.md:65) and corrected the exit-3 message in round_commands.rb. No echo-pipe form remains.

Follow-ups: Live-dispatch re-verification is folded into the #492 replay.

## Resolution **Done:** > *This was generated by AI during triage.* Closing as implemented. **Evidence:** Commit 32e7c7c (2026-08-24) rewrote all eleven settling-agent charters (plugins/os-sdlc/agents/*.md) to use 'os-sdlc-runner subagent-stop < /tmp/handoff-<N>.json' (e.g. change-interpreter.md:65) and corrected the exit-3 message in round_commands.rb. No echo-pipe form remains. **Follow-ups:** Live-dispatch re-verification is folded into the #492 replay.
jared closed this issue 2026-08-26 17:52:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#501
No description provided.