Skip to content

Comments

tui: recover local no-output runs via history fallback#15518

Open
TsekaLuk wants to merge 1 commit intoopenclaw:mainfrom
TsekaLuk:codex/tui-no-output-history-fallback
Open

tui: recover local no-output runs via history fallback#15518
TsekaLuk wants to merge 1 commit intoopenclaw:mainfrom
TsekaLuk:codex/tui-no-output-history-fallback

Conversation

@TsekaLuk
Copy link
Contributor

@TsekaLuk TsekaLuk commented Feb 13, 2026

Summary

Fixes a TUI reliability bug where local runs can finalize as (no output) even though assistant text is persisted shortly after.

Code word: lobster-biscuit

Repro Steps

Related reports:

  1. Start openclaw tui with a provider/model that intermittently emits empty chat.final payload text.
  2. Trigger a run that finishes with (no output) in TUI.
  3. Reopen/reconnect TUI and observe assistant text appears from history.

Root Cause

chat.final can occasionally arrive without renderable assistant text while transcript persistence catches up moments later. TUI currently finalizes immediately and never retries history for local runs, so users see (no output) until reconnect.

Behavior Changes

  • For local runs only, if final text resolves to (no output) and stopReason is not error, schedule two short history refresh retries (200ms, 1000ms).
  • Keep existing behavior unchanged for non-local runs and for runs with valid final output.
  • Centralize no-output placeholder handling in formatter helpers.

Codebase and GitHub Search

Tests

  • pnpm vitest src/tui/tui-event-handlers.test.ts src/tui/tui-formatters.test.ts --run
  • pnpm check

Manual Testing

Prerequisites

  • A TUI session connected to gateway.

Steps

  1. Run a local TUI conversation where a final event may be empty.
  2. Confirm TUI schedules short history fallback and self-recovers without restart.
  3. Confirm normal final outputs still render once with no extra history churn.

Evidence

  • Added targeted test: local final (no output) triggers 2 history retries in src/tui/tui-event-handlers.test.ts.

Sign-Off

  • Models used: GPT-5 Codex
  • Submitter effort (self-reported): High
  • Agent notes (optional, cite evidence): Local targeted tests + lint/type checks passed.

@rmdmattingly
Copy link

CI note: a bunch of checks are marked cancelled (android/checks-windows/release-check/checks/macos/build-artifacts/changed-scope/install-smoke/label/label-issues). This looks like the workflow runs were cancelled rather than a code failure.

I don't have admin rights to rerun from CLI; maintainer rerun on branch codex/tui-no-output-history-fallback should be the next step.

One of the cancelled runs: https://github.com/openclaw/openclaw/actions/runs/21991887337

@TsekaLuk
Copy link
Contributor Author

Hey! 👋 CI is all green on this one. Would you have time to take a look? Happy to make changes if needed. Thanks!

@TsekaLuk
Copy link
Contributor Author

Thanks for the heads up! I don't have admin rights either. Could a maintainer with admin access kindly rerun the failed checks? Thanks!

@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants