You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Worktree creation failure must never silently run the agent in the main checkout #511
Source: research round 18, stolen from a Devin Desktop fix (changelog 2026-08-10): "Starting an agent in a new worktree that fails now surfaces the git error instead of quietly running in your workspace."
The failure mode this prevents is nasty: worktree creation fails (disk full, locked index, branch name collision, dirty submodule), the orchestrator falls back to the main checkout, and the agent now edits, builds, and commits directly on the user's working branch. Every isolation guarantee Solenta advertises is void and the user cannot tell from the UI.
Audit + guard for Solenta (electron/worktrees.js, electron/runner.js):
If a thread was configured to run in a worktree and worktree creation fails, the turn must not start. Surface the git stderr verbatim in the thread with a retry action.
No silent fallback path from "worktree" to "main checkout". If a fallback to main is ever offered, it is an explicit user choice with a scary confirmation, never a default.
Regression test: force git worktree add to fail (fake git on PATH, the pattern already used in electron/test/worktrees.test.js) and assert the runner records a setup error and zero agent processes spawn.
Related: #192 (pre-warmed worktree pool, where a warm-pool miss could be tempted to fall back), #396 (env contract during provisioning).
Round 22 corroboration from Anthropic: Claude Code just hardened worktree isolation along exactly this axis: it "now blocks not only file edits but also Bash commands and git redirects that reach the main checkout, in every session type and in the session's subagents." Their threat model confirms this issue's premise twice over: (1) the escape hatch is not the file tools, it is the shell (cd ../.. &&, git -C /main/checkout, redirects); (2) subagents must inherit the confinement, or the isolation is theater. When auditing Solenta's runner: check what working directory and env a spawned agent's Bash gets, whether git -C back to the main checkout is detectable, and whether the guard propagates to subagent spawns.
Activity
currentbits commentedon Aug 18, 2026
Round 22 corroboration from Anthropic: Claude Code just hardened worktree isolation along exactly this axis: it "now blocks not only file edits but also Bash commands and git redirects that reach the main checkout, in every session type and in the session's subagents." Their threat model confirms this issue's premise twice over: (1) the escape hatch is not the file tools, it is the shell (
cd ../.. &&,git -C /main/checkout, redirects); (2) subagents must inherit the confinement, or the isolation is theater. When auditing Solenta's runner: check what working directory and env a spawned agent's Bash gets, whethergit -Cback to the main checkout is detectable, and whether the guard propagates to subagent spawns.Restore a deleted thread worktree from its preserved branch (#1622)
Rematerialize a missing worktree from its preserved branch (#1400)