ReferenceError: getCurrentOutputStyleName is not defined on session start/resume (regression in 2.1.193, still in 2.1.195)
Summary
Launching/resuming a session crashes with ReferenceError: getCurrentOutputStyleName is not defined. The function is called but never defined in the bundle. Introduced in 2.1.193 and still present in 2.1.195 (latest). 2.1.191 is unaffected.
Error
ERROR getCurrentOutputStyleName is not defined
/$bunfs/root/src/entrypoints/cli.js:32559:7784
- <anonymous> (/$bunfs/root/src/entrypoints/cli.js:32559:7784)
- LT (.../cli.js:545:64488)
- Sie (.../cli.js:545:77933)
- NT (.../cli.js:545:77808)
... (repeated Sie/NT React render frames)
The stack is entirely minified React component render frames, so it fires during a UI render on startup/resume.
Root cause
The bundle contains exactly one code reference to the symbol, a free (un-minified) call with no corresponding definition:
... .agentDefinitions.activeAgents), account: <fn>(), outputStyle: getCurrentOutputStyleName(), mcpServers: ...
Because getCurrentOutputStyleName is left as an un-minified free identifier (no function getCurrentOutputStyleName / const getCurrentOutputStyleName = anywhere), it resolves to nothing at runtime → ReferenceError. This looks like a context/telemetry payload builder (collecting account, outputStyle, mcpServers) that lost its import/definition during bundling.
Evidence across builds (native installer)
Counting code-symbol occurrences in each cached binary:
| Version | getCurrentOutputStyleName refs | Status |
|---------|----------------------------------|--------|
| 2.1.191 | 0 | OK (symbol does not exist) |
| 2.1.193 | call present, no definition | crashes |
| 2.1.195 | call present, no definition | crashes |
So this is a 2.1.193 regression, not new in 2.1.195, and updating does not fix it (195 is latest published).
Repro
- Install/run Claude Code 2.1.193 or 2.1.195 (native installer).
- Start or resume a session (the render path that builds the context payload containing
outputStyle). - Crash with the error above.
Note: no outputStyle is configured in any settings.json, and no custom output styles exist — so it is not a user-config issue. It reproduces with default config.
Workaround
Roll the native-installer symlink back to a good build and pin it:
ln -sfn ~/.local/share/claude/versions/2.1.191 ~/.local/bin/claude
# add to ~/.claude/settings.json env: "DISABLE_AUTOUPDATER": "1"
Environment
- Claude Code: 2.1.193 / 2.1.195 (broken), 2.1.191 (works)
- Install: native installer (
~/.local/share/claude/versions/...) - Platform: macOS (Darwin 25.5.0), arm64
Suggested fix
Restore the missing definition/import of getCurrentOutputStyleName (or guard the call) in the context/telemetry payload builder so the outputStyle field resolves safely.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗