Skip to content

fix(onboard): scope hatch timeout to initial turn - #130010

Merged
steipete merged 1 commit into
mainfrom
codex/onboarding-tui-timeout
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/onboarding-tui-timeout

Conversation

@steipete

@steipete steipete commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.

What Problem This Solves

Classic onboarding passes a five-minute hatch timeout into the post-setup TUI. The TUI forwards its configured timeout to every submitted turn, so the bootstrap safety cap incorrectly remained active for every later interactive message.

Why This Change Was Made

Preserve the shipped five-minute watchdog for the automatic bootstrap hatch message, but scope it to that one startup submission. Later user-entered turns use the normal TUI timeout setting, which classic onboarding leaves unset.

The TUI now accepts an internal initialMessageTimeoutMs option for its automatic startup message. This keeps explicit standalone --timeout-ms behavior unchanged while separating the onboarding bootstrap bound from the rest of the session.

User Impact

A stalled first provider call still times out after five minutes, while users can continue chatting in the TUI opened by classic onboarding without every later turn inheriting the bootstrap cap.

Evidence

Exact head a3915d764bba757c796f7fa9acaf5f275b9e57c2 rebased onto current origin/main:

  • pnpm exec vitest run src/tui/tui-command-handlers.test.ts src/wizard/setup.finalize.test.ts: 257 tests passed.
  • Regression proof sends a bounded automatic hatch turn, then verifies a later interactive turn has no timeout.
  • pnpm check:changed: passed before the conflict-free exact patch rebase.
  • Fresh branch autoreview: clean, patch correct at 0.99 confidence.
  • TruffleHog 3.97.0 scan: clean.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 26, 2026
@steipete
steipete marked this pull request as ready for review August 26, 2026 08:21

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@steipete
steipete force-pushed the codex/onboarding-tui-timeout branch from 429c6fa to 196c83b Compare August 26, 2026 08:31

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main after the prior exact head hit an unrelated 12-byte Control UI CSS gzip-budget variance; this branch does not touch UI. Exact head is now 196c83b2e8657d5a60c5e87c82a99c7f3f786924: 51/51 focused tests pass, TruffleHog is clean, and fresh branch autoreview is clean at 0.99 confidence. @clawsweeper re-review

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 5:31 AM ET / 09:31 UTC.

ClawSweeper review

What this changes

The PR scopes classic onboarding’s five-minute hatch timeout to the automatic startup message instead of every later terminal-chat turn.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The prior P1 is fixed at the current PR head: the hatch cap remains on the automatic startup message while later TUI turns use their normal timeout. No actionable patch defect was found; this maintainer-labeled PR needs ordinary exact-head CI and merge handling.

Priority: P1
Reviewed head: a3915d764bba757c796f7fa9acaf5f275b9e57c2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with behavior-level regression coverage and no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its focused tests remain supplemental evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its focused tests remain supplemental evidence.
Evidence reviewed 5 items Current-main defect: Current main passes the five-minute hatch value as the TUI-wide timeout, and the TUI forwards that option on every chat submission.
Scoped repair path: The PR passes a startup-only timeout from onboarding, supplies it only to the one automatic send, and preserves the regular per-session timeout as the default for ordinary sends.
Final runtime owners: Both Gateway transport and embedded TUI execution carry the per-message timeout through to their final chat-run owners.
Findings None None.
Security None None.

Live Verification

Command: pnpm exec vitest run src/tui/tui-command-handlers.test.ts src/wizard/setup.finalize.test.ts

Result: FAIL (failed) — execution before step 1 run: terminal command did not produce output or exit within 30 seconds: "pnpm exec vitest run src/tui/tui-command-handlers.test.ts src/wizard/setup.finalize.test.ts"

terminal command did not produce output or exit within 30 seconds: "pnpm exec vitest run src/tui/tui-command-handlers.test.ts src/wizard/setup.finalize.test.ts"

Captured output:



















































Assertions:

  • FAIL expect_output: Test Files

How this fits together

Classic onboarding launches the terminal UI with an optional bootstrap hatch message. The UI turns messages into Gateway or embedded-runtime chat runs, where the timeout controls how long each turn may run.

flowchart LR
  A[Classic onboarding] --> B[Bootstrap hatch message]
  A --> C[Terminal UI options]
  B --> D[Startup message submission]
  C --> E[Later interactive submissions]
  D --> F[Gateway or local runtime]
  E --> F
  F --> G[Timed chat run]
Loading

Before merge

  • Resolve merge risk (P2) - This changes first-run terminal availability behavior; the automatic hatch must retain its 300-second cap while later interactive turns remain unbounded unless the user explicitly sets a TUI timeout.
  • Complete next step (P2) - No mechanical repair remains; the protected maintainer label keeps normal exact-head validation and merge handling with maintainers.
Agent review details

Security

None.

PR surface

Source +2, Tests +20. Total +22 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 6 4 +2
Tests 2 27 7 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 33 11 +22

Review metrics

Metric Value Why it matters
Production versus tests production +6/-4; tests +27/-7 The small production increase is the internal per-message timeout boundary; test growth covers both the bootstrap and later-turn outcomes.

Merge-risk options

Maintainer options:

  1. Accept the scoped availability change (recommended)
    The source path and focused regression preserve the bootstrap watchdog while removing its unintended effect on subsequent interactive turns.

Technical review

Best possible solution:

Land the scoped internal startup-message override after exact-head validation, while keeping public --timeout-ms semantics unchanged for standalone TUI sessions.

Do we have a high-confidence way to reproduce the issue?

Yes—source establishes the path on current main: onboarding sets a TUI-wide 300-second timeout and every later sendChat receives it. This read-only review did not execute the terminal flow.

Is this the best way to solve the issue?

Yes—the per-startup-message override repairs the owner boundary without changing the public standalone TUI timeout option or adding configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7da8c19fd021.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its focused tests remain supplemental evidence.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Classic onboarding can impose a five-minute cap on every later user turn, breaking an active terminal-chat workflow.
  • merge-risk: 🚨 availability: The PR changes timeout behavior on the first-run terminal path, where losing the bootstrap watchdog could leave setup stalled.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its focused tests remain supplemental evidence.

Evidence

What I checked:

  • Current-main defect: Current main passes the five-minute hatch value as the TUI-wide timeout, and the TUI forwards that option on every chat submission. (src/wizard/setup.finalize.ts:1041, 7da8c19fd021)
  • Scoped repair path: The PR passes a startup-only timeout from onboarding, supplies it only to the one automatic send, and preserves the regular per-session timeout as the default for ordinary sends. (src/tui/tui.ts:1861, a3915d764bba)
  • Final runtime owners: Both Gateway transport and embedded TUI execution carry the per-message timeout through to their final chat-run owners. (src/tui/embedded-backend.ts:1469, a3915d764bba)
  • Regression coverage: The new regression asserts a 300-second automatic send followed by an unbounded interactive send; wizard tests also assert that onboarding no longer supplies the all-session timeout. (src/tui/tui-command-handlers.test.ts:568, a3915d764bba)
  • History and release status: The affected current-main lines blame to the locally available adjacent TUI/onboarding history; the PR head is neither contained by current main nor by the latest release tag. (src/wizard/setup.finalize.ts:1041, 36560c6a64c6)

Likely related people:

  • steipete: Current affected-line blame and the locally available adjacent TUI/onboarding history identify Peter Steinberger; history depth is limited in this partial checkout. (role: recent area contributor; confidence: medium; commits: 36560c6a64c6; files: src/wizard/setup.finalize.ts, src/tui/tui-command-handlers.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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-review comments, 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-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-26T08:39:14.144Z sha 196c83b2e8657d5a60c5e87c82a99c7f3f786924 :: found issues before merge. :: [P1] Preserve the bootstrap turn timeout

@steipete
steipete force-pushed the codex/onboarding-tui-timeout branch from 196c83b to a3915d7 Compare August 26, 2026 09:25
@steipete steipete changed the title fix(onboard): keep hatch TUI turns unbounded fix(onboard): scope hatch timeout to initial turn Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the P1 finding at exact head a3915d764bba757c796f7fa9acaf5f275b9e57c2: the automatic hatch turn retains the 300-second watchdog through initialMessageTimeoutMs, while subsequent interactive turns no longer inherit that bootstrap-only bound. The focused regression sends both turns and verifies their distinct timeout values; 257 focused tests pass, fresh autoreview is clean at 0.99, and the secret scan is clean. @clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head a3915d764bba757c796f7fa9acaf5f275b9e57c2:

  • 257 focused TUI/onboarding tests passed.
  • The regression submits a 300-second automatic hatch turn, then verifies the later interactive turn has no inherited timeout.
  • Required exact-head CI and the repo-native hosted/Testbox prepare gate passed.
  • Fresh autoreview was clean at 0.99 confidence; TruffleHog found no secrets.
  • ClawSweeper's refreshed exact-head review has no actionable source finding.

The automatic hatch keeps its five-minute watchdog; only later user turns stop inheriting it. A real-provider five-minute stall was not manufactured because that would deliberately hold a paid provider turn open for the full watchdog; the sequential owner-boundary regression proves the exact timeout payloads instead.

@steipete
steipete merged commit 869d207 into main Aug 26, 2026
210 checks passed
@steipete
steipete deleted the codex/onboarding-tui-timeout branch August 26, 2026 10:19

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants