[FEATURE] Session-Based Permission Approval

Status Closed — not planned
Maintainer reply None cached
Activity 6 comments · opened Jan 9, 2026 · closed Apr 30, 2026

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

---
Session-Based Permission Approval

Current situation:
Permission prompts offer two options:

  • Approve once (must approve each individual use)
  • Approve forever (added to settings.json permanently)

Problem:
There's no middle ground for users who want to run autonomous workflows within a single session without granting permanent tool access across all projects and all future sessions.

Proposed Solution

Add a third option in permission prompts:

  • "Allow for this session" - Approved tools reset when the session ends

This reduces permission fatigue while maintaining security boundaries.

Alternative Solutions

The only way is to fragment complex workflows into very small areas/sandboxes, and then give full permissions to a few of them, but coordination and overview suffers a bit, and pathing can be an issue.

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

Use case:
"Today I'm working on projects X and Y. I want Claude to run autonomously, handling whatever tools it needs (except DENY-listed commands), without constant approval prompts. But I don't want Claude to have carte blanche forever and for every project."

Additional Context

_No response_

View original on GitHub ↗

6 Comments

mimkorn · 8 months ago

Closed mine #22475 in favor of this. Copying the description of my perspective here:

Problem Statement
Do you want to proceed?
❯ 1. Yes

  1. Yes, and don't ask again for curl commands in /project-path
  2. Type here to tell Claude what to do differently

Very often what I want to do is to allow something to happen in this session without asking, but not to add it to the project permanently. For example, I wouldn't want to allow websearch in general permanently for a project, but sometimes when I know I will be doing a heavy search conversation, I don't want to be confirming each and every one. However, if I would allow it to not ask again, then I have to remember to correct the settings file afterwards.

Proposed Solution
Do you want to proceed?
❯ 1. Yes

  1. Yes, and don't ask again for curl commands in this session
  2. Yes, and don't ask again for curl commands in /project-path
  3. Type here to tell Claude what to do differently

Alternative Solutions
Alternatively cycleable option for just this session. Cycleability was proposed in https://github.com/anthropics/claude-code/issues/11073 However to my surprise it did not include the option for just the session.

mevouc · 7 months ago

I'd love this feature to be added too. I want to avoid to blindly give permission to Claude to do "write" or web "post" operations by itself without my control most of the time. Even at the project level, that's not something I want.
However, after using plan mode, when I have a clear view in advance of what it's going to do, then I have no issue to give it permission to do several bash commands or web interactions in a row that implies "write" logic, because we agreed on the context/scope first. Allowing per-session would be perfect for that.

yurukusa · 6 months ago

A hook-based approach can implement session-scoped permissions:

INPUT=$(cat)
TOOL=$(echo "$INPUT" | jq -r '.tool_name // empty')
TARGET=$(echo "$INPUT" | jq -r '.tool_input.command // .tool_input.file_path // empty' 2>/dev/null | head -c 80)
SIG="$TOOL:$(echo $TARGET | md5sum | cut -c1-16)"
APPROVED_FILE="/tmp/cc-session-approvals-$$"
if grep -qF "$SIG" "$APPROVED_FILE" 2>/dev/null; then
    echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"Previously approved this session"}}'
    exit 0
fi
echo "$SIG" >> "$APPROVED_FILE"
exit 0

This remembers permissions within a session: first call prompts, subsequent identical calls auto-approve. Approvals are scoped to the session (PID-based file) and don't persist.

github-actions[bot] · 5 months ago

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

mevouc · 4 months ago

This is still relevant, it just have been ignored by ClaudeCode maintainers.

github-actions[bot] · 2 months ago

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.