Repository navigation
Replies: 1 comment
|
Refining the proposal with a better UX option: queue the fork instead of failing. When the source session is still working, accept the fork immediately and put its run in a visible Details worth getting right:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[Feature]: Allow forking a thread while the source session is still working
Forking a thread whose provider session is mid-turn fails hard with:
Real incident: a fork created ~13 seconds after its parent's run started died in ~2s at provider-turn start. Nothing was wrong with the fork point (an earlier completed run) — the guard in
ensureQuiet(packages/provider-opencode/src/server/v2/adapter.ts) refuses to cut/copy history while anything writes to the session, so the only remedy today is "wait for the source to go idle and retry".Why the guard exists is understandable (forking a moving history risks corruption), but the failure mode is bad: the fork's run is marked failed, and a user who just wants to branch off already-settled work has to poll the source thread.
Desired behavior: fork at the last settled history boundary (or queue the fork until the session goes idle) instead of failing. Notably, PR #19986 ("forking an earlier turn while the thread runs no longer fails") already implements exactly this — fork at the earliest eligible settled native-history boundary with a bounded wait and actionable retry advice — but it is still open awaiting review. This discussion tracks the feature request: please land #19986 (or equivalent) so forks off settled work succeed while the source keeps running.
All reactions