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
New-session draft shows no model picker when its folder was deleted #56476
If a new-session draft points at a folder that no longer exists (for example a worktree removed with git worktree remove from a terminal), the draft still shows the composer, but every location request returns LocationNotFoundError. The composer stays in its loading state, so the model and variant controls never appear and nothing says why. Sessions already handle this with a "Session location unavailable" notice; drafts don't.
Thanks for the clear report. I could reproduce this on dev at 8c173a8, which is also the newest dev commit.
I ran the app UI in Chromium against a mock server, with one new-session draft whose folder was gone. Every location request returned LocationNotFoundError, as you describe. I couldn't run the macOS desktop app here.
The draft still showed the composer, but the model/variant control never appeared, nothing explained why, and the workspace chip said "No Git". The screenshot and recording below show this, and the Playwright spec below reproduces it.
Your PR #56477 addresses exactly this case; maintainers will review it.
recording.mp4
Reproduction script (issue-56476.spec.ts)
// Reproduction for anomalyco/opencode#56476: a new-session draft whose folder is gone.// Copy to packages/app/e2e/reproduction/ and run from packages/app:// bunx playwright test e2e/reproduction/issue-56476.spec.ts --project chromiumimport{expect,test}from"@playwright/test"import{draftHref}from"../utils/app"import{mockMissingLocation}from"../utils/mock-server"import{mockWorkspace}from"../utils/workspace"test("draft on a removed folder shows the model picker or a missing-folder notice",async({ page })=>{constgone="C:/OpenCode/DraftGone-removed-worktree"awaitmockWorkspace(page,{name: "DraftGone",sessions: [],fileList: ()=>[],seed: {tabs: [{draft: "draft_gone",directory: gone}]},})// Every request for the removed folder fails the way the server answers for a missing Location.awaitmockMissingLocation(page,gone)awaitpage.goto(draftHref("draft_gone"))awaitpage.waitForTimeout(8000)awaitpage.screenshot({path: "/workspace/repro/issue-56476-draft.png"})constnotice=page.getByText(/unavailable/i)constmodel=page.locator('[data-action="composer-model"]')console.log("composer editor count:",awaitpage.locator('[data-component="composer-editor"]').count())console.log("model control visible:",awaitmodel.isVisible())console.log("unavailable notice count:",awaitnotice.count())// Expected: either the model control or an explanation. Bug: neither appears.awaitexpect(model.or(notice).first()).toBeVisible({timeout: 2000})})
Activity
opencode-agent commentedon Oct 17, 2026
Thanks for the clear report. I could reproduce this on
devat 8c173a8, which is also the newestdevcommit.I ran the app UI in Chromium against a mock server, with one new-session draft whose folder was gone. Every location request returned
LocationNotFoundError, as you describe. I couldn't run the macOS desktop app here.The draft still showed the composer, but the model/variant control never appeared, nothing explained why, and the workspace chip said "No Git". The screenshot and recording below show this, and the Playwright spec below reproduces it.
Your PR #56477 addresses exactly this case; maintainers will review it.
recording.mp4
Reproduction script (issue-56476.spec.ts)
Run it:
bun issue-56476.spec.ts