[Feature Request] "Allow for this session only" option to prevent settings pollution

Resolved 💬 3 comments Opened Dec 20, 2025 by mfurniss Closed Dec 20, 2025

Problem

When allowing a command during a Claude Code session, the permission is automatically saved to .claude/settings.local.json. This causes "settings pollution" where one-off commands accumulate in the settings file over time.

For example, a single exploratory session might add dozens of specific commands like:

"Bash(ls -1 /specific/path/* | grep -v __tests__ | sed 's/.*\\///')"

These commands were useful for that one task but will never be needed again. The settings file becomes cluttered with stale permissions that:

  • Make it harder to see intentional, permanent allows
  • Require periodic manual cleanup
  • Create noise in version control if settings.local.json is committed

Current behavior

Permission prompt options:

  1. Yes - Allows once, but re-prompts on subsequent identical commands in the same session
  2. Yes, always allow - Persists to settings file permanently

Proposed solution

Add a third option:

  1. Yes, allow for this session - Allows the command for the remainder of the current session without persisting to settings.local.json

This would enable developers to work fluidly through exploratory tasks without either:

  • Clicking "Yes" repeatedly for the same command pattern
  • Polluting their settings with transient permissions

Additional context

This is distinct from existing issues about session permissions not being respected (#7104, #11380, #12070). Those are bugs where session-level permissions fail to work. This request is for a new permission tier that intentionally doesn't persist.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗