[Bug] Dual CLI sessions unintentionally switch git branches when working on same repository
Resolved 💬 5 comments Opened Jan 8, 2026 by richovercash Closed Feb 22, 2026
Bug Description
using two cli sessions to work on separate branches of the same git repo, sessions keep switching branches. Bit problem
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 2.0.55
- Feedback ID: 5ffbc712-3302-4138-8ff1-81a327857283
Errors
[{"error":"b01: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg\nnpm error errno -39\nnpm error ENOTEMPTY: directory not empty, rename '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg'\nnpm error A complete log of this run can be found in: /home/hiro/.npm/_logs/2026-01-06T09_20_23_414Z-debug-0.log\n at JLA (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1574:456)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.current (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:2722:9748)","timestamp":"2026-01-06T09:20:23.600Z"},{"error":"b01: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg\nnpm error errno -39\nnpm error ENOTEMPTY: directory not empty, rename '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg'\nnpm error A complete log of this run can be found in: /home/hiro/.npm/_logs/2026-01-06T09_50_23_412Z-debug-0.log\n at JLA (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1574:456)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.current (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:2722:9748)","timestamp":"2026-01-06T09:50:23.594Z"},{"error":"b01: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg\nnpm error errno -39\nnpm error ENOTEMPTY: directory not empty, rename '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg'\nnpm error A complete log of this run can be found in: /home/hiro/.npm/_logs/2026-01-06T10_20_23_400Z-debug-0.log\n at JLA (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1574:456)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.current (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:2722:9748)","timestamp":"2026-01-06T10:20:23.585Z"},{"error":"b01: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg\nnpm error errno -39\nnpm error ENOTEMPTY: directory not empty, rename '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg'\nnpm error A complete log of this run can be found in: /home/hiro/.npm/_logs/2026-01-06T10_50_23_396Z-debug-0.log\n at JLA (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:1574:456)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.current (file:///home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code/cli.js:2722:9748)","timestamp":"2026-01-06T10:50:23.582Z"},{"error":"b01: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg\nnpm error errno -39\nnpm error ENOTEMPTY: directory not empty, rename '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/claude-code' -> '/home/hiro/.nvm/versions/node/v18.20.5/lib/node_modules/@anthropic-ai/.claude-code-8g211Ngg'\nnpm error A complete log of this run can be found in: /home/hiro/.npm/_logs/2026-01-06T11_
Note: Error logs were truncated.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗