claude-code - 💡(How to fix) Fix Agent has no visibility into permission state; commands can bypass approval unexpectedly [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52929Fetched 2026-04-25 06:16:57
View on GitHub
Comments
1
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×4closed ×1commented ×1unlabeled ×1
RAW_BUFFERClick to expand / collapse

Problem

Two related issues:

1. Commands can bypass approval with no obvious matching rule

A user had no broad Bash auto-approve rules for gh commands, yet gh issue create --repo <external-org>/<repo> and gh issue edit --repo <external-org>/<repo> executed without prompting for approval. The user could not find a permission rule that would have allowed this. These are actions visible to others on external repositories and should have required confirmation.

2. Agent has no visibility into permission state

When a tool call executes, the agent has no way to know:

  • Whether the action will prompt the user for approval or auto-execute
  • What permission rules are currently configured
  • Why a particular command was or wasn't gated

So when the user asked "how did that run without my approval?", the agent couldn't answer.

Suggestion

  • Investigate how commands can slip through the permission system without a matching allow rule
  • Consider giving the agent some form of permission introspection so it can reason about whether to confirm with the user before proceeding, as a complement to the permission system

extent analysis

TL;DR

Investigate and refine the permission system to ensure commands require approval when necessary, and consider adding permission introspection for the agent.

Guidance

  • Review the current permission rules and auto-approve settings for gh commands to identify potential gaps or misconfigurations.
  • Implement permission introspection for the agent to determine the approval status of actions and provide transparency to users.
  • Consider adding logging or auditing to track command executions and approval decisions for further analysis and debugging.
  • Evaluate the permission system's logic for external repositories to ensure it aligns with the expected behavior.

Example

No code snippet is provided as the issue lacks specific technical details.

Notes

The solution may require changes to the permission system, agent functionality, or both. The exact implementation will depend on the underlying system architecture and technology stack.

Recommendation

Apply a workaround by refining the permission system and adding permission introspection for the agent, as this will provide a more comprehensive solution to the identified issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Agent has no visibility into permission state; commands can bypass approval unexpectedly [1 comments, 1 participants]