stablyai / stablyai/orca

[Feature]: Continue in New Session can only land in the source workspace, never a new worktree

Open
#19,293 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
71.3k
Forks
4.7k
Avg merge
14h 54m
Merged PRs (30d)
520

Description

### Problem or use case

Research usually starts in the primary workspace. You open a session there to
read code, understand a subsystem, or reproduce a report — no branch, no
checkout, nothing to commit yet. Then the research turns into a change, and
that change needs its own branch and worktree.

Today **Continue in New Session…** cannot get you there. The continuation
dialog inherits `worktreeId` from the source session, so every continuation
starts in the same workspace. The only way to a fresh worktree is to abandon
the session context and start over: create the worktree, launch an agent in
it, and re-explain by hand everything the previous session already knew.

The cost of staying in the source workspace instead is that several sessions
write to one git index, and "what exactly am I committing for this task" stops
being answerable.

### Proposed solution

Give the continuation dialog a **Destination** picker:

- **This workspace** — today's behavior, unchanged and still the default.
- **New worktree** — branch name and base ref; an empty base falls back to the
project default. The worktree is created, then the Agent starts there on the
continuation prompt.

The branch name can be seeded from the source tab title, which usually already
carries the ticket id (`✳ RW-20595 nested components` → `RW-20595`), and stay
editable. Folder workspaces have no branches, so the picker stays hidden when
the source workspace is not a git repo.

### Alternatives or additional context

Workaround today: create the worktree by hand, start a new agent there, and
re-establish context manually — which is exactly the work the continuation
flow exists to avoid.

Adjacent but not a substitute: `orchestration worker-start` can put a
supervised worker in a new worktree, but that is the coordinator path, not the
interactive "I was just reading this and now I want to change it" flow.

I have an implementation ready and will link the PR — happy to adjust the
approach if maintainers would rather shape it differently.

Contributor guide

Open the contributing guide

Research direction

Start at the Continue in New Session dialog and trace how the source session's worktreeId is carried into continuation. Review the existing worktree creation flow and branch/base-ref handling, then verify the destination options, folder-workspace behavior, default selection, and continuation context with the relevant tests or manual flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
desktop, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.