Thread rename fails with ENOENT error: file path resolves to 'n/a'
Description
When attempting to rename a Claude Code thread, the operation fails with an ENOENT error because the file path resolves to the literal string 'n/a' instead of an actual file path.
Error Message
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: ENOENT: no such file or directory, open 'n/a'
at openSync (unknown)
at <anonymous> (/$bunfs/root/claude:12:1277)
at sW (/$bunfs/root/claude:11:8463)
at appendFileSync (/$bunfs/root/claude:12:1200)
at zu_ (/$bunfs/root/claude:1038:3185)
at w6R (/$bunfs/root/claude:1039:78)
at w6R (/$bunfs/root/claude:1039:214)
at <anonymous> (/$bunfs/root/claude:3915:471)
at <anonymous> (/$bunfs/root/claude:3915:522)
at WT (/$bunfs/root/claude:4713:7)
Steps to Reproduce
- Open Claude Code CLI
- Have an existing thread/conversation
- Attempt to rename the thread
Expected Behavior
Thread should be renamed successfully and the new name should persist.
Actual Behavior
Operation fails with ENOENT error. The code appears to be trying to open a file at path 'n/a' which suggests a variable holding the metadata file path is not being properly initialized or resolved.
Impact
- Unable to rename threads to meaningful names
- Makes it difficult to track and organize important conversations
- Thread names remain as auto-generated/hard-to-parse identifiers
Environment
- OS: macOS (Darwin 24.6.0)
- Claude Code Version: 2.0.73
Additional Context
The thread data itself is stored correctly in ~/.claude/projects/<project-path>/<session-id>.jsonl, but the thread naming/metadata storage mechanism appears to have a bug where the file path variable is not being set correctly before the file operation.
---
🤖 Generated with Claude Code
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗