feat(open): Ask whether to open the session in a worktree - #100
Merged
Merged
Conversation
Interactive opens in a git repository now ask once whether to start in a worktree. A yes takes the existing --worktree path; --worktree and the new --no-worktree skip the question, and so do --resume, -p/--print and non-TTY launches.
The gates drive open under script(1) inside the checkout, so the new worktree question blocked them until timeout. Passing --no-worktree keeps them on the launch path they test, the same way they already pass the role.
|
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.



Interactive
codedeck opennow asksOpen in a worktree? [y/N]:right after the role is chosen, so starting a session isolated no longer depends on remembering--worktree.y/yestakes the existing--worktreepath: claude gets-w, opencode and codex get a CodeDeck worktree throughprepareOpenWorktree.nornoopens in the current directory. Any other answer asks again; Ctrl+D rejects before the daemon starts or a session is adopted.--worktree, the new--no-worktree,--resume(a resumed session belongs to its original cwd),-p/--print, a non-TTY, or a cwd outside a git repository.--worktreehelp text no longer says it only asks Claude Code; it applies to all three launchers.Spec:
.specs/features/open-worktree-prompt/spec.md(OWP-01 to OWP-10).Tests
npx vitest run tests/open-worktree-prompt.test.ts: 10 passednpx vitest run tests/open-action.test.ts tests/open-args.test.ts tests/open-codex.test.ts tests/open-opencode.test.ts: 202 passednpx tsc --noEmit: clean--resumeguard failed OWP-10.README line 108 still says opencode
--worktreewarns and continues without isolating, which no longer matchesprepareOpenWorktree. Left for a separate change.