[BUG] CLI is trying to modify a read-only string when formatting diagnostic output

Resolved 💬 3 comments Opened Oct 5, 2025 by avollmers Closed Oct 9, 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?

The CLI instructs me to do type /doctor and says there are 3 errors, and the terminal freezes:

What Should Happen?

I do not now, Claude Code asked me to report it here

Error Messages/Logs

TypeError: Cannot assign to read only property '0' of object '[object String]'
    at N7Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:5764)
    at R7Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:5965)
    at OJQ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:31251)
    at xJQ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:31784)
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:517
    at Array.forEach (<anonymous>)
    at GF6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:38)
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:1018
    at Array.map (<anonymous>)
    at Qr2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:869)

  ERROR  Cannot assign to read only property '0' of object '[object String]'

 file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:5764

 - N7Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:5764)
 - R7Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:5965)
 - OJQ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:31251)
 - xJQ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:31784)
 -  (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:517)
 -     at Array.forEach (<anonymous>)
 - GF6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:38)
 -  (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:1018)
 -     at Array.map (<anonymous>)
 - Qr2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:869)

Node version v24.6.0
Claude Code version 2.0.8 (Claude Code)
MacOS 26.1 Beta (25B5042k) M2

Steps to Reproduce

  1. Open Claude Code, see message "Found 3 invalid settings files · /doctor for details"
  2. type "/doctor"

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.8 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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