Browser: transient "Attachment menu focus changed" aborts the whole run with no retry; stalled streaming still lacks a no-progress timeout
Environment
- oracle 0.21.1 (also observed the stall on 0.17.1), browser engine with the persistent manual-login profile, macOS (zh_CN locale)
- ChatGPT with
--browser-model-strategy current(GPT-5.6 Sol) - Input: a 22-file source bundle (~42.7k tokens, one attachments-bundle.txt)
Part 1 — transient focus race aborts the entire run, no retry
Two consecutive runs with byte-identical input:
-
First run aborted during the upload stage, before anything was submitted:
ERROR: Attachment menu focus changed before activation; upload was stopped.No "ChatGPT thinking" line ever appeared. The failure itself was clean — fail-fast, slot lease released, shared Chrome terminated, no leftover tabs — the 0.19/0.20 hardening is working as designed.
-
Re-run with
--force(same input): completed in 5m58s with a full answer (~3.6k chars). The race is clearly transient.
The friction is that a single transient race wastes the whole run, and re-running requires --force because the duplicate-prompt guard blocks the same prompt. On a heavy input that's a double penalty.
Suggestion: a bounded automatic retry (1–2 attempts with backoff) for this abort class — the run has not submitted anything yet, so retrying the upload is safe — or at minimum a hint in the error that the run can be safely re-run with --force.
Part 2 — stalled streaming has no no-progress timeout
On 0.17.1 the same heavy input once produced a 19-minute silent wait. The log printed the right signal every 30 seconds but never acted on it:
[browser] ChatGPT thinking - 18m 30s elapsed; status=response streaming;
last change 18m 0s ago; stale-hint=no UI progress change
Nothing timed out, nothing warned, and the run only ended when I killed it. On 0.21.1 the help text still scopes --timeout to "aborting the API call" and --zombie-timeout to oracle status display, so browser streaming has no no-progress guard. #457 (fail promptly on Retry failures) and #381 (bound prompt preparation by the input timeout) cover adjacent stages, not this one.
Suggestion: a configurable no-progress timeout for browser streaming — the stale-hint judgment already exists in the logs; it just needs a threshold at which it aborts (or at least warns).
Happy to provide the full session logs for both runs if useful.
Codex review: this still needs some work.
Summary Keep this issue open for a recovery-policy decision: focus rejection is deliberate, the reported wait does not establish a broken browser deadline, and the repository profile prohibits automatic closure.
Reproducibility: Source confirms deliberate focus rejection without automatic recovery, but no current-main reproduction establishes the transient trigger, erroneous duplicate block, or reported deadline failure; no live run or tests were executed.
Maintainer decision needed
- Question: Should this issue proceed with clearer manual-recovery guidance or introduce automatic focus recovery and a separate inactivity policy?
- Recommendation: Improve guidance first: Explain the stopped upload, session-state checks, and existing browser timeout before considering new retry or inactivity behavior.
- Why: The existing focus guard is intentional, heartbeat age cannot distinguish healthy reasoning from a stall, and no recorded maintainer decision defines the proposed recovery behavior.
Next step Choose the recovery contract and obtain redacted session state, the exact duplicate warning, and browser timeout settings before treating the remaining claims as current bugs.
Review details
Best possible solution:
Provide accurate recovery guidance and retain existing completion safeguards, allowing automatic recovery only under an explicitly approved, verifiable safety contract.
Do we have a high-confidence way to reproduce the issue?
Source confirms deliberate focus rejection without automatic recovery, but no current-main reproduction establishes the transient trigger, erroneous duplicate block, or reported deadline failure; no live run or tests were executed.
Is this the best way to solve the issue?
Clearer recovery guidance is the safest first step; bounded retries require a distinct undispatched state, and an inactivity threshold requires a signal stronger than unchanged heartbeat text.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- Retrying attachment-plus-not-ready indiscriminately would combine pre-activation rejection with rejection during delivery.
- Using heartbeat age as an inactivity cutoff could interrupt healthy long-running Pro reasoning.
- The transient focus trigger, duplicate-session discrepancy, and any current deadline overrun lack current-version session evidence.
Codex review notes: model internal, reasoning medium; reviewed against 42a162f53971.
Label changes
Label changes:
- add
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label. - remove
issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label. - remove
clawsweeper:needs-info: Current issue advisory state no longer selects this label.
Label justifications:
P2: The reported upload abort adds recovery effort, but the same input completed on rerun and no current outage is established.impact:ux-friction: Upload recovery and the distinction between API, browser, and inactivity timeouts cause avoidable uncertainty in an advanced CLI workflow.
Evidence reviewed
Acceptance criteria:
- pnpm exec vitest run tests/browser/attachmentDispatchSafety.test.ts tests/browser/pageActions.test.ts tests/browser/thinking.test.ts tests/cli/duplicatePromptGuard.test.ts
- Before a repair PR, establish a failing regression for the specifically approved behavior and verify it passes after the change.
- For an approved browser behavior change, follow docs/manual-tests.md with preserved Markdown and long-Pro safeguards.
What I checked:
- Repository policy applied: Read the complete root AGENTS.md at the current main checkout; its browser guidance requires preserving long Pro reasoning and never activating Answer now. The supplied repository profile prohibits automatic closure. (
AGENTS.md:18, 42a162f53971) - Focus rejection has two delivery boundaries: activateComposerPlus rejects focus loss both before activation and during event delivery with attachment-plus-not-ready; ambiguous activation separately forbids automatic retry, and uploadAttachmentFile calls activation without a focus-retry loop. (
src/browser/actions/attachments.ts:181, 42a162f53971) - Original dispatch-safety contract: The commit patch introduces the reported focus guard; its message explicitly preserves conversation identity and prohibits replaying ambiguously dispatched actions. https://github.com/steipete/oracle/pull/431 documents the same safety boundary and focus-race coverage. (
src/browser/actions/attachments.ts:183, 1c2435c4cda1) - Browser timeout already exists: Documentation specifies a 1200-second browser timeout, distinct from the API timeout, with recovery settings; a 19-minute wait alone is within that default. The capture watchdog checks its deadline, and the renderer observer installs a timeout. (
docs/browser-mode.md:120, 42a162f53971) - Heartbeat age does not measure answer progress: The last-change fingerprint includes status message, source, percentage, and panel visibility rather than assistant text. In https://github.com/steipete/oracle/issues/391#issuecomment-5310274381, postoso withdrew the stall inference after observing the same pattern during healthy Pro reasoning; a later historical deadline-overrun report remains distinct. (
src/browser/actions/thinkingStatus.ts:124, 42a162f53971) - Duplicate-block claim needs session evidence: The duplicate guard considers only running sessions, whereas normal browser-error handling marks the session error at src/cli/sessionRunner.ts:861; the report provides neither the exact duplicate warning nor persisted state explaining the discrepancy. (
src/cli/duplicatePromptGuard.ts:32, 42a162f53971)
Likely related people:
- mechanicus: Raw commit 543b65359757960be4ef5324b0cb01ffe3ac9b7b adds src/browser/assistantResponseRuntime.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 543b65359757; files:
src/browser/assistantResponseRuntime.ts)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
- Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Reviewed October 17, 2026, 1:00 PM ET / 17:00 UTC.