Crash (Trace/BPT trap: 5) when running multiple instances with custom statusLine command

Resolved 💬 6 comments Opened Jan 18, 2026 by OranOved Closed Feb 27, 2026

Description

Running two Claude Code instances from the same repository causes a crash when a custom statusLine command is configured in settings.

Environment

  • Claude Code version: v2.1.12
  • OS: macOS (Darwin 25.2.0)

Configuration

The following statusLine configuration in ~/.claude/settings.json triggers the crash:

"statusLine": {
  "type": "command",
  "command": "input=$(cat); dir=$(echo \"$input\" | jq -r '.cwd'); ctx=$(echo \"$input\" | jq -r '.context_window.used_percentage | floor'); model=$(echo \"$input\" | jq -r '.model.display_name // .model // empty'); branch=$(git -C \"$dir\" branch --show-current 2>/dev/null); if [ -n \"$branch\" ]; then echo \"\\033[1;36m${model}\\033[0m \\033[1;34m${dir##*/}\\033[0m \\033[1;33m(${branch})\\033[0m \\033[1;35m[${ctx}%]\\033[0m\"; else echo \"\\033[1;36m${model}\\033[0m \\033[1;34m${dir##*/}\\033[0m \\033[1;35m[${ctx}%]\\033[0m\"; fi"
}

Steps to Reproduce

  1. Add the above statusLine configuration to ~/.claude/settings.json
  2. Open a terminal and run claude in a git repository
  3. Open another terminal and run claude in the same repository
  4. The second instance crashes immediately after startup

Error Output

Trace/BPT trap: 5

The crash happens right after displaying the status line. Note that the context percentage shows as [%] instead of a number, suggesting the command output parsing may have failed.

Workaround

Removing the statusLine configuration from settings allows multiple instances to run from the same repository without issues.

Expected Behavior

Multiple Claude Code instances should be able to run from the same repository even when a custom statusLine command is configured.

View original on GitHub ↗

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