[BUG] TypeError: Cannot read properties of null (reading 'alwaysThinking') on new session launch
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?
- Error: TypeError: Cannot read properties of null (reading 'alwaysThinking') at cli.js:2212
- Trigger: Any new Claude Code session (claude, cd ~ && claude, new terminal tab) — existing sessions unaffected
- Not fixed by: npm install -g @anthropic-ai/claude-code@latest, deleting session .jsonl files, removing effortLevel from
settings
- Platform: macOS (include your sw_vers output)
- Version: include claude --version output
- Settings: ~/.claude/settings.json contains effortLevel: "low", model: "sonnet" — though removing effortLevel did not fix it
- Workaround: Existing sessions continue to work normally; only new session initialization crashes
What Should Happen?
What should happen: Claude Code should launch successfully and present the interactive prompt. The thinking/effort
configuration should initialize with safe defaults if any config value is null or missing, rather than throwing an unhandled
TypeError.
Error Messages/Logs
TypeError: Cannot read properties of null (reading 'alwaysThinking')
at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2212:1757
at Object.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:32:25928)
at J3Q.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:7000)
at Tb (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2212:1735)
at NC (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:32:19415)
at Cp (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:42814)
at Z9 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:38355)
at Eh (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:38283)
at kC (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:38137)
at jH (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:35216)
Steps to Reproduce
. Install latest Claude Code (npm install -g @anthropic-ai/claude-code@latest)
- Open a new terminal tab
- Run claude in any directory (including cd ~ && claude)
- Observe crash on launch — never reaches the interactive prompt
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.9 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗