Handoff target_agent_type stamps the bare map agent name; prefixed dispatch types never claim their handoff #472

Closed
opened 2026-08-21 19:14:03 +00:00 by jared · 1 comment
Owner

Context

next_step.rb:209-210 stamps target_agent_type from the map node's agent value ("code-probe"); a dispatch registered under the Claude Code prefixed type ("os-sdlc:code-probe") claims with the prefixed string, so Handoff.claim_for misses and the brief composes handoff: null. Observed live in the #467 drive (O2, docs/os-sdlc-rebuild/poodr-map-first-drive.md). Whether the real SubagentStart hook reports prefixed types (hitting this in hook-driven runs, #454) is unconfirmed. Fix path: normalize the os-sdlc: prefix in Handoff.claim_for or stamp both forms.

Skeptic verdict: CREATE — real bug, concrete repro, known fix path, distinct from #470/#454.

Origin

  • Trigger: #467 first supervised POODR-map drive, observation O2 (2026-08-21).
  • Improvised this session: bare agent names passed to subagent-start/subagent-stop.
  • Chain: handoff: null in composed brief ← claim_for keyed on prefixed type ← target stamped bare at next_step.rb:209-210 ← DESIGN (no ADR on agent-type normalization).
  • Root candidate: this ticket.
## Context next_step.rb:209-210 stamps target_agent_type from the map node's agent value ("code-probe"); a dispatch registered under the Claude Code prefixed type ("os-sdlc:code-probe") claims with the prefixed string, so Handoff.claim_for misses and the brief composes handoff: null. Observed live in the #467 drive (O2, docs/os-sdlc-rebuild/poodr-map-first-drive.md). Whether the real SubagentStart hook reports prefixed types (hitting this in hook-driven runs, #454) is unconfirmed. Fix path: normalize the os-sdlc: prefix in Handoff.claim_for or stamp both forms. Skeptic verdict: CREATE — real bug, concrete repro, known fix path, distinct from #470/#454. ## Origin - Trigger: #467 first supervised POODR-map drive, observation O2 (2026-08-21). - Improvised this session: bare agent names passed to subagent-start/subagent-stop. - Chain: handoff: null in composed brief ← claim_for keyed on prefixed type ← target stamped bare at next_step.rb:209-210 ← DESIGN (no ADR on agent-type normalization). - Root candidate: this ticket.
Author
Owner

Resolution

Done: Fix already shipped: both hooks normalize the agent type before the runner sees it, stripping the os-sdlc: prefix, so Handoff.claim_for matches the bare target_agent_type stamped by the map. Empirical question answered: the harness does report prefixed types.

Evidence: normalize_agent in plugins/os-sdlc/hooks/subagent_start.rb:16-20 and subagent_stop.rb:14-18; Handoff.claim_for exact-match at handoff.rb:24-29 receives bare form; transcript 4b7df35f-2278-4286-b566-6aaffba53864.jsonl (#508 drive) shows three dispatches registered as subagent_type os-sdlc:programmer, confirming prefixed harness payloads. Caveat: hook stdin is not persisted in transcripts, so no literal payload capture; verdict rests on prefixed dispatch records plus the shipped normalization.

Follow-ups: none — optional belt-and-suspenders (temporary debug log of raw hook stdin during the next live drive) judged unnecessary given converging evidence; dropped

## Resolution **Done:** Fix already shipped: both hooks normalize the agent type before the runner sees it, stripping the os-sdlc: prefix, so Handoff.claim_for matches the bare target_agent_type stamped by the map. Empirical question answered: the harness does report prefixed types. **Evidence:** normalize_agent in plugins/os-sdlc/hooks/subagent_start.rb:16-20 and subagent_stop.rb:14-18; Handoff.claim_for exact-match at handoff.rb:24-29 receives bare form; transcript 4b7df35f-2278-4286-b566-6aaffba53864.jsonl (#508 drive) shows three dispatches registered as subagent_type os-sdlc:programmer, confirming prefixed harness payloads. Caveat: hook stdin is not persisted in transcripts, so no literal payload capture; verdict rests on prefixed dispatch records plus the shipped normalization. **Follow-ups:** none — optional belt-and-suspenders (temporary debug log of raw hook stdin during the next live drive) judged unnecessary given converging evidence; dropped
jared closed this issue 2026-08-26 20:35:48 +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#472
No description provided.