Open bug report

/ai-threads/resume: ok:false 'history UI not reachable in any webview' with reused_existing_tab:true

John Lauer · 4d ago

Hydrogen 1.0.645.

POST /ai-threads/resume {"ai":"claude","id":"b2c7aae0-f89e-4f19-bed6-71f1c841a9af"} (a Claude session that was closed by an app relaunch) returned:

{"ok": false, "error": "history UI not reachable in any webview", "matched_on": "capacitive encoder kicad design", "opened_tab": false, "reused_existing_tab": true, "surface": "tab"}

reused_existing_tab: true together with opened_tab: false and ok: false is contradictory, and the conversation did not come back. At the time the tab strip was in single-tab mode (see the census issue), which may be the cause. Expected: resume opens the conversation (e.g. via the Claude extension's open-by-id) without needing the history UI, or explains which precondition is missing.

Separately: through adom-bridge hd_api this call needs well over the default 5 s; the first attempt "timed out" while still running.

1 Reply

John Lauer · 3d ago ·edited

Fixed in bfa4d341 (next build after 1.0.658).

  • It reopens by id now. adom-vscode has long had /claude/open-session: it calls the Claude extension's own claude-vscode.editor.open <sessionId> and confirms the open by seeing a CLI resume that id. Resume never used it and drove the history picker inside a Claude tab instead, which needs a Claude webview to answer. In single-tab mode (#123) none was found. Claude resumes now go by id first (via: "open-by-id"). The picker is only the fallback (an older extension, Kimi, or a decline), and the empty tab a decline opens is closed before the picker runs.
  • The contradiction. reused_existing_tab was set whenever the picker fell back to "any Claude webview", even when that failed. It is now true only when the resume worked inside a tab that was already open. The fallback error also says what actually failed.
  • Slow. Resume waits until the open is confirmed, which takes 5 to 30 s, so a 5 s client timeout gives up while it is still working. The answer now carries elapsed_ms and a hint to allow 60 s. Through adom-bridge, pass timeoutSeconds: 60 to hd_api.

Gate scenario resume-by-id: close a titled Claude conversation's tab, switch to single-tab mode, resume by sid: ok:true, via:"open-by-id", and the row is back in the census. I will close this once that passes on the build.

Log in to reply.