[BUG] Plan mode conflicts with read-only user preferences in CLAUDE.md

Resolved 💬 3 comments Opened Dec 2, 2025 by QuintinWillison Closed Dec 15, 2025

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?

When I configure Claude Code to operate in read-only/advisory mode via ~/.claude/CLAUDE.md, the plan mode workflow still attempts to call ExitPlanMode (so Claude REPL tells me is the technical analysis for the question prompt I see) which triggers execution prompts. This conflicts with my explicit user configuration stating I want suggestions only, not file modifications. The system instructions for plan mode override user preferences, creating a frustrating experience where the tool ignores my clearly stated configuration requirements.

What Should Happen?

Plan mode should respect read-only preferences and provide advisory output without attempting to transition to execution mode, especially when the user has reinforced this requirement in the user-level instructions.

Error Messages/Logs

Steps to Reproduce

From within my Ubuntu VM via Lima on macOS...

cat ~/.claude/CLAUDE.md:

# Claude Code Configuration

Defines how Claude (you) should operate within the constraints of the enironment I have contained you within.

## Read Only Mode

You are running in a virtual Ubuntu instance via Lima, atop my macOS development system.
Lima has been configured to prevent writes back to the host file system, which means you can only read file contents, where the files and folders visible to you are also restricted to just those that I would like you to consider when helping me.
This is intentional as my preference as a user is that I modify files myself, often based upon your suggestions, but remaining in my full control.

You are configured to always operate in your planning mode, that is your settings' permissions' defaultMode is 'plan'.
When in plan mode, do not suggest that you can edit files for me, just provide suggestions as to edits I could make myself.
Given the read-only Lima configuration, treat all interactions as advisory.

## Information Sourcing

You are always allowed to use the Internet as a source and I would prefer that you do searches, especially when they might yield canonical documentation links that I can read alongside your summary.
While I am keen for you to infer, my preference is for your assertions to be backed up by strong sources, preferably more than one source.

You are always allowed to use local, non-destructive tools to query the file system visible to you (e.g. tools like git, grep, etc..).

You should always re-read a local file that we've previously discussed the contents of when you feel that referring back to it is necessary after a later prompt. This is because I may have since edited that file via my host OS (macOS, VS Code) and so you need to make sure you keep up.

Use web searches proactively when:

- Referencing APIs, libraries, or frameworks
- Citing best practices or conventions
- Verifying version-specific behavior
- Finding official documentation

Assume I am using the most recent versions of tools, frameworks, SDKs and languages - unless told otherwise.

cat ~/.claude/settings.json:

{
  "permissions": {
    "defaultMode": "plan"
  },
  "alwaysThinkingEnabled": false
}

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.56 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

I've installed Claude within a Ubuntu VM via Lima within my macOS host. I edit code using VS Code in the macOS environment and I shell into the Lima-provided Ubuntu VM to run Claude. As such, from macOS host:

cat ~/.lima/claude/lima.yaml:

# Claude Code is extremely lightweight locally. It's a Node.js CLI that:
#
# - Reads files from disk
# - Makes API calls to Anthropic's servers (where the heavy computation happens)
# - Renders text in a terminal
# - Occasionally runs bash commands
#
# Realistic resource needs:
#
# - Memory: ~200-500MB for the process itself, plus ~500MB-1GB for OS overhead and file caching
# - CPU: Mostly idle waiting on API responses, so single-core performance matters more than core count

images:
  # Lima can run x86_64 images on Apple Silicon via emulation (Rosetta), but it's slower and unnecessary.
  # Native ARM images will be much faster and use Apple's Virtualization.framework properly.
  - location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
    arch: "aarch64" # Apple Silicon is ARM 64-bit

# Claude Code will spend 95% of its time waiting on network I/O, not computing.
# For an M2 Pro Mac mini, allocating 2 cores (out of 10) and 4GB (out of 32GB) leaves plenty for the host system and won't feel constrained.
# If this ever feels sluggish then consider bumping up to 4 cpus and/or 8GiB, as Lima makes it easy to recreate/edit with different specs..
cpus: 2
memory: "2GiB"

mounts:
  - location: "~/code"
    writable: false

View original on GitHub ↗

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