Repository navigation
Never run a worktree thread in the main checkout - #522
Merged
Merged
Conversation
If git worktree add fails, record the verbatim stderr on the thread and refuse to start the turn. A missing worktree rematerializes instead of silently falling back to the project folder.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #511. If a thread was asked to run in a worktree and
git worktree addfails, the turn does not start. The agent never falls back to the project checkout.Why
A failed worktree (disk full, locked index, branch collision, dirty submodule) used to drop isolation: the orchestrator kept going in the user's working branch. The UI could not tell. Every isolation guarantee Solenta advertises was void.
A missing worktree folder had the same hole:
clearMissingWorktreecleared the pointer andstartRun/ workflows continued withthread.worktreePath || project.path, posting "running in the project folder instead."What changed
setupWorktreesurfaces verbatim git stderr, not the first line ofCommand failed: git worktree add ….startRun/startWorkflowRunrecord the user prompt, that error as an event,status: failed, andlastError. The existing Retry-turn button attaches. Zero agent processes spawn.pendingWorktreestays set so retry rematerializes.pendingWorktreeand rematerializes. No checkout fallback. Workflows throw rather than useproject.path.There is no "run in main anyway" default. Isolation is fail-closed.
Tests
84 pass. The new file puts a fake
gitonPATHthat fails onlyworktree addand asserts the runner records the setup error with no Claude spawn.