inject-subagent-context.sh missing penny case — no context injection at spawn #157

Closed
opened 2026-03-24 20:25:25 +00:00 by forgejo_admin · 2 comments
Contributor

Type

Bug

Lineage

Discovered during QA review of PR #135 (penny spawn schema fix)

Repo

forgejo_admin/claude-custom

What Broke

inject-subagent-context.sh has a case statement that injects context per agent type at spawn time. There is no penny case, so penny agents get zero context injection — no personality, no MCP tool hints, no project awareness.

Repro Steps

  1. Spawn a penny agent: Agent(subagent_type="penny", prompt="Check email...")
  2. Agent starts with no injected context — no personality, no tool hints
  3. Penny operates without awareness of her MCP tools (Gmail, Notion, etc.)

Expected Behavior

Penny should get context injection matching her role (communications agent — Gmail, calendar, social media, external KBs). The agents/penny.md profile exists but isn't wired into the inject script.

Environment

  • Cluster/namespace: local dev (archbox)
  • Service version/commit: claude-custom main branch
  • Related alerts: none — silent failure, no error

Acceptance Criteria

  • penny case added to inject-subagent-context.sh
  • Context includes Penny's MCP tools (Gmail, Notion, etc.)
  • No regression for other agent types
  • PR #135 (where this was discovered)
  • Issue #132 (parent penny spawn fix)
  • Issue #133 (Penny MCP spike — depends on this)
### Type Bug ### Lineage Discovered during QA review of PR #135 (penny spawn schema fix) ### Repo `forgejo_admin/claude-custom` ### What Broke `inject-subagent-context.sh` has a case statement that injects context per agent type at spawn time. There is no `penny` case, so penny agents get zero context injection — no personality, no MCP tool hints, no project awareness. ### Repro Steps 1. Spawn a penny agent: `Agent(subagent_type="penny", prompt="Check email...")` 2. Agent starts with no injected context — no personality, no tool hints 3. Penny operates without awareness of her MCP tools (Gmail, Notion, etc.) ### Expected Behavior Penny should get context injection matching her role (communications agent — Gmail, calendar, social media, external KBs). The `agents/penny.md` profile exists but isn't wired into the inject script. ### Environment - Cluster/namespace: local dev (archbox) - Service version/commit: claude-custom main branch - Related alerts: none — silent failure, no error ### Acceptance Criteria - [ ] `penny` case added to `inject-subagent-context.sh` - [ ] Context includes Penny's MCP tools (Gmail, Notion, etc.) - [ ] No regression for other agent types ### Related - PR #135 (where this was discovered) - Issue #132 (parent penny spawn fix) - Issue #133 (Penny MCP spike — depends on this)
Author
Contributor

Scope Review: READY

Review note: review-347-2026-03-27

All file targets verified. The inject-subagent-context.sh case statement (lines 18-31) confirmed missing penny — falls through to * wildcard with zero context. The settings.json SubagentStart matcher correctly routes penny to the hook, but the hook drops it. agents/penny.md profile exists with full role/tool definitions ready to source the context string.

  • Template: all 9 bug sections present
  • Traceability: story:dev-execute, arch:agent-spawn, issue open
  • Dependencies: #132 closed (prerequisite met), #133 open (unblocked by this)
  • Blast radius: no other scripts need penny case changes
  • Decomposition: single file, single case branch — well under 5 minutes

Minor note for implementer: acceptance criterion 2 mentions Gmail but gmail-mcp is NOT DEPLOYED per agents/penny.md. Context string should reflect currently available tools (pal-e-docs read-only, Notion).

## Scope Review: READY Review note: `review-347-2026-03-27` All file targets verified. The `inject-subagent-context.sh` case statement (lines 18-31) confirmed missing `penny` — falls through to `*` wildcard with zero context. The `settings.json` SubagentStart matcher correctly routes penny to the hook, but the hook drops it. `agents/penny.md` profile exists with full role/tool definitions ready to source the context string. - Template: all 9 bug sections present - Traceability: story:dev-execute, arch:agent-spawn, issue open - Dependencies: #132 closed (prerequisite met), #133 open (unblocked by this) - Blast radius: no other scripts need penny case changes - Decomposition: single file, single case branch — well under 5 minutes Minor note for implementer: acceptance criterion 2 mentions Gmail but `gmail-mcp` is NOT DEPLOYED per `agents/penny.md`. Context string should reflect currently available tools (pal-e-docs read-only, Notion).
Author
Contributor

Validation: PASS

Validation note: validation-157-2026-03-27
4 checks: 4 PASS, 0 FAIL

All acceptance criteria verified against live main branch (commit 91ce684, PR #176). Penny case present, MCP tools referenced in context, no regression to other agent types, pattern consistent with qa/dev/dottie cases.

## Validation: PASS Validation note: `validation-157-2026-03-27` 4 checks: 4 PASS, 0 FAIL All acceptance criteria verified against live main branch (commit 91ce684, PR #176). Penny case present, MCP tools referenced in context, no regression to other agent types, pattern consistent with qa/dev/dottie cases.
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
ldraney/claude-custom#157
No description provided.