YELLOW: spawn sub-Claude to resolve instead of falling through to dialog #19
Labels
No labels
enhancement
observability
research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/claude-permit#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When the LLM scores a tool call as YELLOW, claude-permit currently falls through to Claude Code's built-in permission dialog, interrupting the user. Instead, claude-permit could spawn a separate
claude --printsub-process that takes responsibility for resolving the YELLOW — proposing an alternative, asking the user a more focused question, or auto-resolving from policy — so the call never reaches the standard dialog.User Stories Served
Proposed Change
On YELLOW from the PreToolUse evaluator:
claude --print --model haikuwith a dedicated resolver prompt.approve— auto-approve, optionally with a stashed rule for PostToolUse promotionapprove_alternative— substitute a safer command (returned viadecision.modify-style response if Claude Code supports it, otherwise stderr instruction back to calling Claude)deny— escalate to RED with reasoningask_user— fall through to the original dialog only if nothing else worked, but with a much richer reason stringWhy
Claude Code's permission dialog is binary (approve/deny on the exact call). It can't:
A sub-Claude can do all of these. The dialog becomes the rare last resort.
Considerations
claude --print, same as the current LLM call. Two haiku calls per YELLOW is acceptable.CLAUDE_PERMIT_BYPASS=1.X→Y") so the system stays observable. Consider routing through stderr or the audit log review skill (/audit).Related
Open Questions
audit.jsonlhistory to learn user preferences ("user always denies this pattern → preemptively deny")?