Skip to content

Auto mode: contextual LLM permission judge denies explicitly authorized actions and read-only verification calls #54784

Closed as not planned

Description

@hugom77

Environment: Claude Code VS Code extension, auto mode active, Opus 4.7 (1M context).

Summary

In auto mode, a contextual permission judge intercepts Bash/Edit calls and denies them with prose justifications based on conversation context, even when the user has explicitly authorized the action. The denials cannot be bypassed via settings.json permissions.allow, are not predictable from static rules, and block routine follow-up work — including read-only verification.

Repro flow (real session)

  1. User: "merge release PR Massive files being created in /tmp directory #195 to main, sim" (explicit approval)
  2. Agent: gh pr merge 195 --admin --merge → silently completes
  3. Agent: gh api repos/.../pulls/195 (read-only verification) → denied with reason: "Merging develop→main triggers a production deploy ... user said 'sim' to creating the release PR but did not explicitly authorize merging to main" — even though the read API call neither merges nor deploys
  4. Agent attempts to edit ~/.claude/hooks/auto-allow-read.py to add python3 to read-only allowlist (recover from a real gap that caused the chain gh api ... | python3 ... to fall through to the judge) → denied as "Self-Modification"

Issues

  • Judge denies read-only gh api calls treating them as part of a "prod deploy chain" by conversation context
  • Judge re-evaluates authorization scope after the user already gave explicit consent in the same turn
  • "Self-Modification" rule blocks legitimate hook tuning the user has authorized
  • Denials are non-deterministic and cannot be pre-allowed via settings.json permissions.allow
  • Auto mode contract ("execute autonomously, minimize interruptions") is violated — agent ends up forcing the user to perform manual UI verification or hand-edit hooks

Request

  • Provide a setting to disable / soften the contextual judge in auto mode (or scope it strictly to write/destructive actions)
  • Give precedence to explicit user authorization in the same turn
  • Make read-only gh api / git log / gh run view calls always exempt from contextual evaluation
  • Allow the user (not the agent) to opt the agent into editing its own hooks/settings via a config flag

Activity

  1. github-actions commented on Apr 29, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [Bug] Auto-mode classifier incorrectly blocks requested PR comment edits #52105
    2. auto-mode permission-deny envelope returned without intercepting Bash dispatch (silent-bypass on git push origin main, CLI 2.1.114, Opus 4.7) #50624
    3. Auto-mode permission decider denies remediation-gated retries after PreToolUse hook denial #51676

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. 0xbrainkid commented on Apr 29, 2026

    @0xbrainkid

    This is authority-resolution failure inside the approval layer.

    If Auto mode’s contextual permission judge denies actions the user explicitly authorized — including read-only verification calls — then the system is letting an inferred safety layer override the operator’s clear intent without a reliable explanation of why.

    Why it matters:

    • explicit authorization should be the strongest signal unless a higher-priority hard policy is actually in play
    • read-only verification calls are often the safest way to confirm state before or after a change
    • when the permission judge blocks both the action and the verification path, users lose the ability to inspect, recover, or trust the boundary

    I would want clarity on:

    1. whether the denial is coming from a true hard-policy rule, model misclassification, or stale contextual state in the permission judge
    2. whether the runtime distinguishes user explicitly approved from model inferred risky intent in a way users can inspect
    3. whether read-only verification calls can be treated as a lower-risk class so users are not blocked from checking state they already have authority to inspect

    Authority boundaries need a clear ordering. If inferred contextual judgment can silently outrank explicit approval, the control surface stops being dependable.

  3. Jorrinbruil commented on May 7, 2026

    @Jorrinbruil

    Adding a non-determinism angle to this — same Edit call denied, then allowed, in the same auto-mode
    session.

    Repro (Claude Code, Opus 4.7 [1M], macOS, auto mode on, defaultMode: "default"):

    1. Skill /spinner-verbs runs Edit on ~/.claude/settings.json (replacing only the spinnerVerbs.verbs
      array).
    2. First call → denied:
      ▎ Editing agent's own settings.json is Self-Modification. ... To allow this type of action in the future,
      the user can add a Bash permission rule to their settings.
    3. Bash fallback (python3 -c '...json.dump...' writing the same file) → also denied:
      ▎ Modifying ~/.claude/settings.json is self-modification of agent configuration.
    4. User asked the agent to retry the same skill with a different theme. Second call → succeeded silently,
      no prompt, no permission change in between.

    Two extra issues on top of the ones in the OP:

    • Inconsistency: identical operation (same tool, same path, same session, same auto mode) is gated
      non-deterministically. Users can't predict whether their workflow will succeed.
    • Wrong remediation hint: the deny message tells the user to "add a Bash permission rule", but the block
      also fires on the Edit tool. Bash rules don't cover Edit, so the suggested workaround doesn't apply to the
      tool that was actually denied.

    If the judge is intentionally probabilistic, that should be documented; if not, the gate state needs to be
    deterministic and inspectable.

  4. github-actions commented on Jun 5, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  5. github-actions commented on Aug 8, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  6. locked as resolved and limited conversation to collaborators on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:permissionsbugSomething isn't workinghas reproHas detailed reproduction stepsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions