[BUG] tengu_scratch field when set to true causes claude to fail launching and freeze CLI

Resolved 💬 7 comments Opened Jan 21, 2026 by nbergs-cai Closed Mar 2, 2026

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?

I'm running version 2.1.14 and noticed that claude suddenly fails to launch and freeze the CLI.
Here is the debug print from that session from .claude/debug which shows it got stuck almost immediately (changed local path to $HOME for security):

2026-01-21T17:59:04.839Z [DEBUG] Watching for changes in setting files <$HOME>/.claude...
2026-01-21T17:59:04.844Z [DEBUG] [init] configureGlobalMTLS starting
2026-01-21T17:59:04.844Z [DEBUG] [init] configureGlobalMTLS complete
2026-01-21T17:59:04.844Z [DEBUG] [init] configureGlobalAgents starting
2026-01-21T17:59:04.844Z [DEBUG] [init] configureGlobalAgents complete

After deleting ~/.claude and ~/.claude.json and launching, it worked once but on 2nd launch would freeze again.
Comparing the .claude.json file, there were 3 fields that changed (used claude web console for debug):

Before first run:
json"tengu_mcp_tool_search": false,
"tengu_scratch": false,

After first run (causes freeze):
json"tengu_mcp_tool_search": true,
"tengu_scratch": true,
"tengu_c4w_usage_limit_notifications_enabled": true


But more importantly, there's a feature flag `"tengu_pid_based_version_locking": true` — and we saw this in your debug logs:

[ERROR] Error: NON-FATAL: Lock acquisition failed for <$HOME>/.local/share/claude/versions/2.1.14 (expected in multi-process scenarios)

Experimenting some more, "tengu_scratch" was the only field that made a difference. claude code would set it to true and then the next launch would fail. Setting this back to false would make it work again.
Please note that even though I did have multiple sessions open in parallel before, mostly on different workspaces. For this debugging I had used only a single claude session.

I noticed that this field was added fairly recently but didn't find documentation for it. Please advise on how to solve the issue. Thank you!

What Should Happen?

Claude should launch and not freeze CLI

Error Messages/Logs

No error messages in CLI or debug log

Steps to Reproduce

  1. Set tengu_scratch to "true" in ~/.claude.json
  2. Launch claude from any path in CLI

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.14 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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