Feature request: read-only session mode for side chats

Resolved 💬 3 comments Opened Apr 15, 2026 by stevenjjobson Closed Apr 19, 2026

Problem

Claude Code doesn't distinguish between a main working session and a casual side chat. Both have full tool access, so there's no guardrail preventing writes to persistent state (memory files, project plans, requirement docs) during what the user considers a throwaway conversation.

Users who build structured workflows on top of Claude Code — with session lifecycles, plan archival, requirement update contracts, and memory management — need a way to say "this is a side chat, read-only only."

Current Workaround

Users can add instructions to CLAUDE.md or memory files like "never write memory, archive plans, or update requirements from a side chat." But this relies on the model honoring a soft convention, and it's easy to violate — especially when the model is trying to be helpful by persisting something it learned.

Proposed Solution

A session mode or context marker that scopes what kind of work is appropriate:

  • A flag like --read-only or --side-chat when launching Claude Code
  • Or a /mode read-only slash command that restricts tool access for the remainder of the conversation
  • Or a hook-based approach where a SessionStart hook can set readOnly: true based on context

When active:

  • Read tools (Read, Grep, Glob, Bash read-only commands) work normally
  • Write tools (Edit, Write, Bash write commands) are blocked or require explicit override
  • Memory writes, plan files, and other persistent state changes are suppressed

Why This Matters

The cost of an unwanted write in a side chat is subtle but real:

  • Memory files get polluted with unreviewed observations
  • Plan archives accumulate entries from throwaway discussions
  • Requirement docs drift from casual mentions rather than deliberate updates
  • The next proper session inherits stale or incorrect state

This matters most for power users who treat Claude Code as infrastructure — with MCP servers, structured projects, and multi-session continuity contracts.

View original on GitHub ↗

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