Review: Agent spawn bug

review-347-2026-03-27 Review

review ready

Verdict: READY

Template Completeness

  • [x] Type — Bug
  • [x] Lineage — Discovered during QA review of PR #135
  • [x] Repo — forgejo_admin/claude-custom
  • [x] What Broke — clear description of missing case branch
  • [x] Repro Steps — 3 steps, reproducible
  • [x] Expected Behavior — specific and actionable
  • [x] Environment — local dev (archbox), main branch
  • [x] Acceptance Criteria — 3 criteria
  • [x] Related — PR #135, Issue #132, Issue #133

Traceability

  • [x] story:dev-execute — developer agent execution workflow
  • [x] arch:agent-spawn — agent spawn infrastructure component
  • [x] Forgejo issue — forgejo_admin/claude-custom#157, open

File Targets

  • [x] hooks/inject-subagent-context.sh — verified: case statement at lines 18-31 has branches for qa, dev, general-purpose|dottie only. No penny case. Wildcard * at line 28 silently exits with zero context injection.
  • [x] agents/penny.md — verified: profile exists with full role definition, MCP tool list (pal-e-docs read-only, Notion full access), and constraints. This is the source material for the context string.
  • [x] settings.json line 246 — verified: SubagentStart matcher includes penny (qa|dev|general-purpose|dottie|penny), so the hook IS called for penny spawns but the case statement drops it.
  • [x] schemas/agent-spawn-requirements.json — verified: penny entry exists (issue #132 already closed). No gate patterns required.

Repo Placement

Correct. Issue filed on forgejo_admin/claude-custom. Fix is in hooks/inject-subagent-context.sh in the same repo.

Dependencies

  • Issue #132 (penny missing from spawn schema) — closed/done. Prerequisite satisfied.
  • Issue #133 (Penny MCP spike — OAuth wiring) — open, in todo column. Depends on this ticket per its labels. This ticket unblocks #133.
  • Board item #227 (Spike: Penny MCP services) — has depends:132 label. Should probably also reference this ticket as a dependency since penny context injection is needed before MCP spike work is meaningful.
  • No items currently blocking this ticket.

Acceptance Criteria

  • [x] "penny case added to inject-subagent-context.sh" — testable: grep for penny in case statement
  • [x] "Context includes Penny's MCP tools (Gmail, Notion, etc.)" — testable: spawn penny agent and verify additionalContext output
  • [x] "No regression for other agent types" — testable: spawn qa/dev/dottie agents and verify their context unchanged
All 3 criteria are agent-verifiable. Note: criterion 2 mentions Gmail but agents/penny.md shows gmail-mcp is NOT DEPLOYED yet. The context string should reference currently available tools (pal-e-docs read-only, Notion) and mention future tools. This is a minor scoping note, not a blocker.

Blast Radius

  • No other case statements need penny — check-agent-spawn.sh uses schema-driven validation (not case statements), and penny is already in the schema.
  • block-penny-writes.sh exists as a separate enforcement hook — already wired in agents/penny.md. Not affected by this change.
  • No sibling services affected — this is a single hook file in claude-custom.

Recommendation

No action needed — ticket is ready for next_up. Single file change, well-scoped, under 5 minutes of agent work. The implementing agent should reference agents/penny.md for the context string content and note that Gmail/gcal MCP servers are not yet deployed (context string should reflect current state, not aspirational).