[REGRESSION] Mandatory worktree isolation breaks hardware-in-the-loop development — live PLC codebase analysis, debug and re-deploy cycle completely severed
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?
The April 14, 2026 Claude Code Desktop redesign introduced mandatory git worktree isolation for all Code tab sessions. Previously, the Code tab operated directly on the actual repository working directory. Now, all file edits go to .claude/worktrees/<random-name>/ instead.
This has completely broken an integrated hardware-in-the-loop development workflow used for industrial PLC automation projects on GitHub-hosted team repositories:
- Claude Code (Code tab) would analyse and edit TwinCAT 3 PLC source files (
*.TcPOU,*.TcGVL,*.tsproj) directly in the git working directory - TwinCAT XAE / Visual Studio would detect file changes in the same directory, build the project, and deploy to the target PLC controller via ADS
- Claude would connect to the live running PLC via ADS-MCP (TwinCAT ADS Model Context Protocol server) to monitor live symbol values and correlate runtime behaviour against source code intent
- Debugging and re-deployment would iterate until behaviour was correct on hardware
- Only then would a git commit and push occur
With mandatory worktrees, all edits now go to .claude/worktrees/ — a path the TwinCAT XAE toolchain has no awareness of. XAE sees no changes, no build occurs, nothing is deployed to the PLC, and the ADS-MCP live monitoring is comparing PLC runtime state against code that has never been deployed. The entire workflow chain collapses at the first step.
What Should Happen?
The Code tab should provide a project-level option to operate directly on the actual repository working directory, as it did prior to the April 14, 2026 redesign — identical to the pre-redesign behaviour and to the default CLI behaviour without --worktree.
A minimal solution would be a setting in .claude/settings.json:
{ "worktrees": { "enabled": false } }
When disabled, Code tab sessions edit files in the real repo working directory. The existing multi-session worktree isolation remains the default and is unaffected for projects that do not opt out.
This is essential for any development domain where the working directory is the test environment: the IDE toolchain must see Claude's changes to build, deploy, and validate on physical hardware before a commit is appropriate. CI cannot substitute for this — there is no emulator or container for a physical PLC running a deterministic real-time OS.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code Desktop (v1.2773.0, Windows), Code tab
- Select a TwinCAT 3 PLC project git repository as the project folder
- Start a new session
- Ask Claude to make a change to a PLC source file (e.g. a
*.TcPOUfunction block) - Check the actual repository directory — the source file has not been modified
- Check
.claude/worktrees/— the modification was made there instead - Attempt to build the project in TwinCAT XAE (Visual Studio 2019) — XAE sees no changes; build compiles the original unmodified source
- Deploy to target PLC controller — the running code reflects the original source, not Claude's edits
- Attempt live symbol monitoring via ADS-MCP — runtime state cannot be correlated against Claude's changes because they were never deployed
- The hardware debug and re-deploy cycle cannot proceed; there is no path to hardware validation before commit
Note: No error messages are produced. The workflow silently breaks because the edits are written to the wrong location.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Prior to Claude Desktop v1.2581.0 (April 14, 2026)
Claude Code Version
1.2773.0 (Windows)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Related to #31896. The ADS-MCP server (part of Anthropic's MCP ecosystem) was actively used within Code tab sessions for live PLC monitoring — the worktree change severs the link between Claude's edits and what ADS-MCP can validate against. Same regression affects all embedded toolchains with fixed project path references: Keil MDK, IAR, STM32CubeIDE, TIA Portal, Studio 5000, Codesys, Vivado, Quartus.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗