Summary
When adr_approve is called from a subagent (e.g. via Claude Code's Agent tool), the MCP tool invocation triggers a permission prompt that only the human operator can approve in the main thread UI. Subagents run in isolated contexts with no UI surface — the permission prompt is never shown, the call hangs or is auto-rejected, and the subagent is permanently stuck with no recovery path.
Environment
- Claude Code with MCP adr-kit server
- adr-kit v0.2.7 (solution8-com/AIRStack-ADRKit fork, also reproducible on upstream)
- Triggered when dispatching implementation agents that need to create + approve ADRs as part of their task
Reproduction
- Dispatch a subagent via Claude Code's Agent tool
- Subagent calls
mcp__adr-kit__adr_create — succeeds (no permission prompt required)
- Subagent calls
mcp__adr-kit__adr_approve — triggers Claude Code permission prompt
- Permission prompt appears only in main thread UI, not visible to subagent or its operator context
- Subagent waits indefinitely or receives auto-rejection with no actionable error message
- Human operator in main thread cannot see the pending prompt — it is silently consumed
Root Cause
adr_approve modifies files on the filesystem (ADR markdown files + adr-index.json). Claude Code treats MCP tool calls that write to the repository as potentially destructive and gates them with a human approval prompt. This is by design in Claude Code's permission model.
adr_create does the same filesystem writes but apparently does not trigger the prompt in practice — the difference may be that approve mutates an existing file (status change) whereas create is additive.
Impact
- Subagent-driven development workflows (dispatching fresh agents per task) cannot use
adr_approve at all
- Any automated or agentic workflow that needs to create + approve ADRs in one pass is blocked
- No CLI fallback:
adr-kit approve is not a CLI subcommand — approval is MCP-only
Note: this is separate from issue #24 (parallel approval rejections). This issue occurs even with a single sequential adr_approve call inside a subagent.
Suggested Mitigations
Option A — Document the constraint (minimal)
Add a note to README / MCP tool description that adr_approve must be called from the main thread only, never from a subagent. Subagents can call adr_create; the human or main-thread agent handles approval.
Option B — Non-interactive approve mode (preferred)
Add a --no-confirm / auto_approve parameter to adr_approve that skips the permission-gated filesystem write and instead writes directly. This would let subagents approve ADRs in contexts where the calling agent has already been granted trust (e.g. an agent explicitly told "approve all ADRs you create").
Option C — Split into two operations
Expose a adr_set_status tool that only updates the YAML status field without triggering a permission prompt. adr_approve would call adr_set_status + emit the human-approval event separately. Subagents use adr_set_status directly.
Related
Summary
When
adr_approveis called from a subagent (e.g. via Claude Code's Agent tool), the MCP tool invocation triggers a permission prompt that only the human operator can approve in the main thread UI. Subagents run in isolated contexts with no UI surface — the permission prompt is never shown, the call hangs or is auto-rejected, and the subagent is permanently stuck with no recovery path.Environment
Reproduction
mcp__adr-kit__adr_create— succeeds (no permission prompt required)mcp__adr-kit__adr_approve— triggers Claude Code permission promptRoot Cause
adr_approvemodifies files on the filesystem (ADR markdown files +adr-index.json). Claude Code treats MCP tool calls that write to the repository as potentially destructive and gates them with a human approval prompt. This is by design in Claude Code's permission model.adr_createdoes the same filesystem writes but apparently does not trigger the prompt in practice — the difference may be thatapprovemutates an existing file (status change) whereascreateis additive.Impact
adr_approveat alladr-kit approveis not a CLI subcommand — approval is MCP-onlyNote: this is separate from issue #24 (parallel approval rejections). This issue occurs even with a single sequential
adr_approvecall inside a subagent.Suggested Mitigations
Option A — Document the constraint (minimal)
Add a note to README / MCP tool description that
adr_approvemust be called from the main thread only, never from a subagent. Subagents can calladr_create; the human or main-thread agent handles approval.Option B — Non-interactive approve mode (preferred)
Add a
--no-confirm/auto_approveparameter toadr_approvethat skips the permission-gated filesystem write and instead writes directly. This would let subagents approve ADRs in contexts where the calling agent has already been granted trust (e.g. an agent explicitly told "approve all ADRs you create").Option C — Split into two operations
Expose a
adr_set_statustool that only updates the YAML status field without triggering a permission prompt.adr_approvewould calladr_set_status+ emit the human-approval event separately. Subagents useadr_set_statusdirectly.Related
adr_approvefunction)approval_notesinsertion