Crash in resume picker: TypeError: Cannot read properties of undefined (reading 'trim')
Summary
The interactive resume picker (claude --resume) crashes with TypeError: Cannot read properties of undefined (reading 'trim') when the session list contains entries that are "continued from a previous conversation" (i.e. auto-compaction continuations). The crash fires repeatedly on every keystroke / render, making the picker unusable.
This update genuinely broke my ability to get back to work — filing alongside #51842 (the related UX gap where there's no in-app resume path at all).
Reproduction
- Work long enough in a session that context auto-compacts, producing "This session is being continued from a previous conversation that ran out of context. The summary below covers the earlier p…" entries.
- Quit Claude Code.
- From the project directory, run
claude --resume. - Picker renders with ~8 continuation entries, all sharing that same truncated summary prefix.
- Pressing arrow keys / trying to select any entry (or sometimes just opening the picker) throws the stack trace below, repeated many times per render cycle.
Stack trace
TypeError: Cannot read properties of undefined (reading 'trim')
at nh6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1708:4403)
at pw (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:72:19414)
at Mt (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:42806)
at b9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:38347)
at Up (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:38275)
at B$ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:38129)
at Mz (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:35208)
at ZQ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:72:4840)
at J5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:32453)
at Q.updateContainer (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:78:1827)
Likely cause: nh6 in cli.js:1708 calls .trim() on a field (probably the first user message / title) that is undefined for continuation sessions, because the "continued from previous" entries don't have a user message in the usual slot.
Workaround
Resume by explicit session ID, bypassing the picker entirely:
claude --resume <session-uuid-from-~/.claude/projects/>
This works, which confirms the crash is purely in the picker's render/formatting code — the underlying session data is fine.
Environment
- Claude Code: 2.0.33
- Node: v25.6.0
- OS: macOS 15.6.1 (Darwin 24.6.0, ARM64)
- Install:
/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code
Impact
Blocks resume from the interactive picker for any user whose sessions have auto-compacted (i.e. any long-running work). Combined with the lack of an in-app resume flow (#51842), it's a rough experience after an update.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗