anthropics / anthropics/claude-code

[BUG] Permission classifier blocks the actions that would grant permission — no escape hatch in non-interactive sessions

Open
#87,809 1 comment 0 reactions 0 assignees View on GitHub
area:desktop area:permissions bug platform:windows
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

In a non-interactive session (Claude Code desktop/web, where terminal dialogs like `/permissions` do not exist), the auto-mode permission classifier can deny an action AND deny every route the user has to authorize it. The result is a deadlock neither side can exit, even when the user explicitly and repeatedly says "you are authorized, do it".

Real sequence from a session today (infrastructure work with the `railway` CLI):

1. Assistant runs `railway variables --service --set K=V` - denied: "Permission for this action was denied by the Claude Code auto mode classifier."
2. Assistant explains and offers to add an allowlist rule. User replies, in plain language: "allow railway and continue".
3. Assistant invokes the documented settings-editing skill (`update-config`) - **also denied**, same generic message.
4. `/permissions` is unavailable on this surface.

No path forward exists from inside the session. The user then sent six escalating messages ("I am tired of manually lifting barriers you create", "Everything is allowed!!!", "Tell me what I have to do to actually unblock you"), which is a fair reaction: from their seat the assistant looks like it is inventing obstacles, when in fact the harness is refusing the unblock too.

The eventual exit was a direct `Edit` to `.claude/settings.local.json` adding `"Bash(railway:*)"`, which **succeeded**. So the same intent is denied through the sanctioned path (the skill) and allowed through a raw file edit. Whichever is intended, the two should agree.

Related papercut: the denial text says the assistant "may attempt to accomplish this action using other tools that might naturally be used", but gives no way to distinguish an acceptable alternative from a "workaround that bypasses the intent". For a blocked CLI command, is the vendor own web dashboard (driven through the browser tool, in the user authenticated session) an alternative or a bypass? Both readings are defensible, so the assistant oscillated - refusing once, accepting later - and the inconsistency reads as arbitrary to the user.

### What Should Happen?

A user should always have a way to raise the authorization ceiling from inside the session, especially on surfaces where terminal dialogs do not exist.

1. **Never block the unblock.** Edits to `.claude/settings*.json` and the settings-editing skill should be allowed (or prompt), never silently denied. Blocking the grant mechanism turns a speed bump into a wall.
2. **Offer the grant in the denial itself** - an inline "allow `railway` once / for this project / for this session" affordance, the way an interactive permission prompt does. Today the denial tells the assistant to hand the problem to the user, and the user has no button to press.
3. **Accept a natural-language ceiling.** "You may run any `railway` command in this project" should be enough; the assistant should translate that into the rule and apply it, without the user having to learn `Bash(cmd:*)` syntax.
4. **Make the "other tools" guidance decidable** - either a denied action stays denied through every tool (including browser automation of a vendor dashboard), or only the command was denied and equivalent paths are fine.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Open Claude Code on a surface without terminal dialogs (desktop or web app), in auto permission mode, in a project whose `.claude/settings.local.json` has no rule for the CLI you will use.
2. Ask the assistant to perform an infrastructure change with a non-allowlisted CLI, e.g. `railway variables --service SERVICE --set KEY=value`.
3. Observe the classifier denial.
4. Tell the assistant, in plain language, to grant itself the permission and continue.
5. Observe that its attempt to use the settings-editing skill (`update-config`) is **also denied**, with the same message.
6. Try `/permissions` - unavailable on this surface. Deadlock.
7. Note that a direct `Edit` of `.claude/settings.local.json` adding `"Bash(railway:*)"` does succeed, which is the inconsistency.

### Claude Model

_No response_

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

Claude Code desktop app (Windows); claude --version not reachable from the session shell

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

PowerShell

### Additional Information

Reported at the user request after hitting this during a multi-repo deployment session. The user own summary: "the harness classifier blocking commands is garbage - there should be an authorization ceiling the user can grant so friction is minimal."

The permission model works well once a rule exists; the gap is purely in *getting* the rule in place when the session has no interactive dialog.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the deadlock in a non-interactive desktop or web session using the railway CLI, then compare the denied update-config path with a direct Edit to .claude/settings.local.json. Read the auto-mode permission classifier, settings-editing skill, and /permissions entry point if available. Done means a user can raise authorization from inside a dialog-free session and the sanctioned path agrees with direct settings edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
authorization, cli, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.