claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Options for more restrictive tool permission grants in TUI

Open acmorrow opened this issue 3 months ago • 4 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Just because I granted access to run a tool once in a TUI session, doesn't mean I want all possible tool commands permitted indefinitely in the session. Maybe just exactly the one I said yes to, and maybe just for that prompt. There seems to be a lack of controls within the session and a lack of controls to make granted permissions transient or narrow.

Proposed Solution

I'd like to be able to put claude code into a mode where it needs to explicitly obtain clearance to run a command with different parameters. In other words, just because I approved tool abc for the session, claude should not then be able to run tool xyz without approval, which it appears to be able to do. Finally, just because I want claude to be able to run the tool without confirmation for my current request, I may not want it to be able to run those again for the next task without re-obtaining confirmation.

I'd suggest adding these two options to the tool use dialog. What I currently get looks like:

│   ide - getDiagnostics(uri: "file:///some/path/file.cpp") (MCP) 
│   Get language diagnostics from Emacs 
│  
│ Do you want to proceed?                                                                                                                                                  │
│ ❯ 1. Yes
│   2. Yes, and don't ask again for ide - getDiagnostics commands in /some/path
│   3. No, and tell Claude what to do differently (esc) 

What I'd like to see would be:

│   ide - getDiagnostics(uri: "file:///some/path/file.cpp") (MCP) 
│   Get language diagnostics from Emacs 
│  
│ Do you want to proceed?                                                                                                                                                  │
│ ❯ 1. Yes
│   2. Yes, and don't ask again for ide - getDiagnostics commands in /some/path in this session
|   3. Yes, and don't ask again for ide - getDiagnostics command for /some/path/file.cpp in this session
│   4. Yes, and don't ask again for ide - getDiagnostics commands in /some/path for this prompt
|   5. Yes, and don't ask again for ide - getDiagnostics command for /some/path/file.cpp for this prompt
│   6. No, and tell Claude what to do differently (esc) 

Alternative Solutions

I don't really have one. Once tool use is granted, it appears to persist for all possible invocations of that tool in the session.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

I have a slightly dangerous tool. I get prompted, and I've reviewed the arguments, it looks good, I tell claude to go ahead and allow it to be run without asking. Much later in the session, long after I've forgotten about that interaction, claude decides it should use the tool but with different arguments, which I would not have approved. Bad things result.

Had I had the option to be clear about my intentions (just that exact command, just running it as is repeatedly as needed for this task), that couldn't have happened.

Additional Context

Hey, apologies in advance if this actually already exists somehow and I've overlooked the relevant option or something. I'm fairly new to using claude-code, but having great success with it so far. I just have a conservative streak when it comes to letting it run tools, and I've gotten surprised a few times when it went and did something I didn't expect / intend / desire based on prior authorizations.

acmorrow avatar Oct 10 '25 15:10 acmorrow

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9087
  2. https://github.com/anthropics/claude-code/issues/3389
  3. https://github.com/anthropics/claude-code/issues/5570

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

github-actions[bot] avatar Oct 10 '25 15:10 github-actions[bot]

I had a look at those just now, and I don't think any of them are exactly the same. I guess #9087 it depends on whether by session they mean prompt, but I don't think they do. #3389 appears to be about aligning things in a config file with what you can do in the TUI, not expanding the set of options in the TUI itself. And #5570 seems to be the opposite of what I want.

acmorrow avatar Oct 10 '25 15:10 acmorrow

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 10 '25 10:12 github-actions[bot]

I think this is still an issue, and I'd value having these finer controls.

acmorrow avatar Dec 10 '25 12:12 acmorrow