[BUG] Permission Prompts Ignore "Allow for Session" Selection
Preflight Checklist
- [x] I have searched existing issues 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?
Claude Code Version: Current (as of April 2026)
OS: macOS Darwin 25.2.0
Model: Sonnet 4.5 (us.anthropic.claude-sonnet-4-5-20250929-v1:0)
Summary
When editing files in ~/.claude/ directory, selecting "Yes, and allow Claude to edit its own settings for this session" (option 2) does not prevent subsequent permission prompts for additional edits to the same file in the same session. Each edit triggers a new prompt, requiring manual approval every time.
Impact
Severity: High - Significantly degrades user experience
Workflow Impact:
- Interrupts autonomous task execution
- Requires constant manual intervention
- Defeats the purpose of "allow for session" feature
- Makes iterative configuration work extremely tedious
- Creates "prompt fatigue" where users stop reading prompts carefully
Use Cases Affected:
- Skill development and iteration
- Agent configuration updates
- Settings.json modifications
- Any workflow requiring multiple edits to Claude Code config files
Observed in This Session
During a single session refactoring the /review skill:
- 6-7 edits made to
skills/review/SKILL.md - User selected option 2 every single time
- Every edit still prompted for permission
- Total interruptions: 6-7 prompts for the same file in same session
What Should Happen?
Expected Behavior
When user selects option 2: "Yes, and allow Claude to edit its own settings for this session"
The permission system should:
- Allow the current edit
- Remember this approval for the entire session
- Not prompt again for subsequent edits to files matching the same pattern
- Apply to:
~/.claude/**(all files in Claude config directory)
Actual Behavior
When user selects option 2:
- Current edit is allowed ✅
- Session approval is NOT remembered ❌
- Next edit triggers another prompt ❌
- User must select option 2 again ❌
- This repeats for every single edit ❌
Error Messages/Logs
Steps to Reproduce
Reproduction Steps
- Ask Claude to edit a file in
~/.claude/(e.g.,~/.claude/skills/review/SKILL.md) - Permission prompt appears:
```
Edit file
SKILL.md
Do you want to make this edit to SKILL.md?
- Yes
❯ 2. Yes, and allow Claude to edit its own settings for this session
- No
```
- Select option 2: "Yes, and allow Claude to edit its own settings for this session"
- Edit completes successfully
- Ask Claude to make another edit to the same file
- BUG: Permission prompt appears again with same options
- Select option 2 again
- Repeat steps 5-7 for 3rd, 4th, 5th edit...
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.91 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Evidence from Session
Example from session transcript:
User: "I just had several prompts to edit SKILL.md even tho we agreed to
avoid repetitive prompts and I chose the second option every time. I really
don't know what to do here, I'm at my wits' end"
Edit sequence (same file, same session):
- Edit 1 → Prompt → User selects option 2
- Edit 2 → Prompt → User selects option 2 (should not have prompted)
- Edit 3 → Prompt → User selects option 2 (should not have prompted)
- Edit 4 → Prompt → User selects option 2 (should not have prompted)
- Edit 5 → Prompt → User selects option 2 (should not have prompted)
- Edit 6 → Prompt → User selects option 2 (should not have prompted)
Configuration Context
settings.json permissions:
{
"permissions": {
"allow": [
"Edit(~/.claude/**)",
"Edit(~/.claude/settings.json)",
"Edit(//Users/paul.molluzzo/.claude/**)",
"Write(~/.claude/**)",
"Write(//Users/paul.molluzzo/.claude/**)",
"Read(~/.claude/**)",
"Read(//Users/paul.molluzzo/.claude/**)"
]
}
}
Note: Even with explicit Edit(~/.claude/**) permission, first edit still triggers prompt (expected), but "allow for session" should prevent subsequent prompts (broken).
Analysis
Possible Root Causes
- Session state not persisting: Permission approval is not being stored in session state
- Pattern matching issue: "Allow for session" may only apply to exact file path, not pattern
- Scope limitation: Permission scope might reset between tool calls
- Cache invalidation: Session permissions might be cleared prematurely
Related Observations
- This affects all file edit operations, not just
.claude/directory - Agent/subagent sessions don't inherit main session permissions (separate issue)
- First-time permission prompts are expected and working correctly
- The issue is specifically with "allow for session" not persisting
Expected Fix
When user selects option 2 ("allow for session"):
Store in session state:
{
"session_permissions": {
"Edit": {
"~/.claude/**": {
"approved": true,
"scope": "session",
"timestamp": "2026-03-13T12:00:00Z"
}
}
}
}
On subsequent edit attempts:
- Check session_permissions before prompting
- If pattern matches and scope is "session" → allow without prompt
- Clear session_permissions only when session ends
Workarounds (Current)
For Users
Option 1: Accept the prompts (current reality)
- Select option 2 every time
- Accept that it will keep prompting
- This is tedious but functional
Option 2: Batch all edits
- Ask Claude to read entire file first
- Have Claude plan ALL changes
- Make exactly ONE edit with all changes combined
- This reduces 10 prompts to 1 prompt
- Requires discipline from Claude
Option 3: Edit files manually
- For multiple changes to config files
- Edit yourself in editor
- Bypasses permission system entirely
For Claude Instances
Best practice: Make exactly ONE edit per file
- Read entire file
- Plan all changes
- Make one combined Edit call
- Never make sequential edits
This is the only way to minimize prompts, but it's a workaround not a fix.
Additional Context
Why This Matters
Claude Code configuration files (skills, agents, settings) are designed to be iterative:
- Skills are refined through multiple edits
- Agents are tuned based on testing
- Settings are adjusted incrementally
The current permission behavior makes this iterative process painful, requiring constant manual intervention.
User Frustration Quote
"I'm at my wits' end"
This captures the real impact - users expect "allow for session" to work, get repeatedly prompted anyway, and lose confidence in the tool's reliability.
Suggested Priority
Priority: High
Reasoning:
- Affects core workflow (config file editing)
- Breaks explicitly documented feature ("allow for session")
- Creates significant user frustration
- Has workarounds but shouldn't require them
- Affects adoption for power users who customize Claude Code
Test Case for Verification
When this bug is fixed, this test should pass:
# Start new session
claude chat
# Test sequence
1. Ask: "Edit ~/.claude/test-file.md - add line 'test 1'"
2. Prompt appears → Select option 2 ("allow for session")
3. Ask: "Edit ~/.claude/test-file.md - add line 'test 2'"
4. Expected: NO PROMPT (edit happens automatically)
5. Ask: "Edit ~/.claude/test-file.md - add line 'test 3'"
6. Expected: NO PROMPT (edit happens automatically)
# Pass criteria:
✅ First edit prompts (correct)
✅ Subsequent edits do NOT prompt (currently FAILS)
Related Issues
This may be related to or share root cause with:
- Agent sessions not inheriting main session permissions
- Permission patterns not matching during execution
- Settings file edits always prompting (even with Edit permission)
---
Appendix: Session Log Extract
Example of repeated prompts for same file:
[12:30:00] Edit(~/.claude/skills/review/SKILL.md) → Prompt
[12:30:15] User selects option 2
[12:30:20] Edit complete
[12:31:00] Edit(~/.claude/skills/review/SKILL.md) → Prompt (SHOULD NOT HAPPEN)
[12:31:10] User selects option 2
[12:31:15] Edit complete
[12:32:00] Edit(~/.claude/skills/review/SKILL.md) → Prompt (SHOULD NOT HAPPEN)
[12:32:08] User selects option 2
[12:32:12] Edit complete
... (repeats 4 more times)
User's reaction:
"I'm at my wits' end"
This is not acceptable UX for a feature explicitly designed to reduce prompts.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗