openclaw - ✅(Solved) Fix [Bug]: TUI input vanishes silently — messages typed/pasted disappear from history with no response [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59014Fetched 2026-04-08 02:29:54
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Author
Participants
Assignees
Timeline (top)
cross-referenced ×5assigned ×1closed ×1commented ×1

Messages typed or pasted into the TUI disappear silently — no response, no error, and the message is not visible in the conversation history afterwards. The user watches the message vanish from the screen while looking at it.

This is distinct from the existing input-swallowed-during-generation bug (#45326). This happens even when the agent is idle.

Error Message

Messages typed or pasted into the TUI disappear silently — no response, no error, and the message is not visible in the conversation history afterwards. The user watches the message vanish from the screen while looking at it. 4. Message appears briefly then vanishes — not in history, no reply, no error Message should appear in history and agent should respond. If something fails, an error should be shown — not silent disappearance.

Root Cause

Messages typed or pasted into the TUI disappear silently — no response, no error, and the message is not visible in the conversation history afterwards. The user watches the message vanish from the screen while looking at it.

This is distinct from the existing input-swallowed-during-generation bug (#45326). This happens even when the agent is idle.

PR fix notes

PR #59800: fix(tui): preserve pending sends and busy-state visibility

Description (problem / solution / changelog)

Summary

  • Problem: the TUI could lose track of optimistic local sends during history reload/reconnect paths, show confusing busy/error state during fallback/terminal-error transitions, and waste horizontal width on long links and paths.
  • Why it matters: users could see prompts disappear and later reappear, get stuck in unclear run state, and struggle to read or copy long terminal output.
  • What changed: pending local user turns are preserved and reconciled through transcript rebuilds, active-run/error cleanup is more coherent, Esc/editor handling is covered more directly, and chat rendering reclaims width for long links and paths.
  • What did NOT change (scope boundary): this PR does not add full Pi-style runtime-owned steer/follow-up queues or a new pending queue panel; it stays focused on stabilizing the existing TUI state model.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Related #59014
  • Related #59627
  • Related #59570
  • Related #55300
  • This PR fixes a bug or regression

Root Cause / Regression History (if applicable)

  • Root cause: the TUI relied on optimistic local-send state that was not durably reconciled with history rebuilds and run lifecycle transitions, so reload/error paths could desynchronize visible user turns from real run state.
  • Missing detection / guardrail: there was no focused coverage for pending-send reconciliation across history rebuilds and not enough direct tests around the TUI error/final cleanup paths.
  • Prior context (git blame, prior PR, issue, or refactor if known): issue reports in #59014, #59627, #59570, and #55300 all point at state-coherence failures in the TUI.
  • Why this regressed now: the optimistic-send path assumed fast run attribution and simple finalization, which breaks under reconnect/history replay and fallback/error timing.
  • If unknown, what was ruled out: not just markdown rendering; the disappearing-send behavior came from TUI transcript/state handling.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/tui/components/chat-log.test.ts, src/tui/tui-command-handlers.test.ts, src/tui/tui-event-handlers.test.ts, src/tui/tui-session-actions.test.ts, src/tui/tui.test.ts, src/tui/components/custom-editor.test.ts
  • Scenario the test should lock in: pending local sends survive history rebuilds until a matching run is anchored or dropped, run/error cleanup returns the TUI to a coherent state, and the editor key handling stays stable.
  • Why this is the smallest reliable guardrail: these are TUI-local state-machine bugs, so focused unit coverage hits the failure path directly without network flake.
  • Existing test that already covers this (if any): N/A
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • Pending local sends no longer disappear during history reload/reconnect windows.
  • Busy/error state is less likely to get stuck or look idle at the wrong time.
  • Long links and paths get more usable width in chat rendering.
  • TUI editor key handling now has direct regression coverage.

Diagram (if applicable)

Before:
[user send] -> [optimistic local state] -> [history reload or error transition] -> [message/status can disappear or desync]

After:
[user send] -> [tracked pending local state] -> [history rebuild reconciles it] -> [run anchors or drops explicitly] -> [status stays coherent]

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 / pnpm worktree
  • Model/provider: N/A
  • Integration/channel (if any): TUI + gateway chat client
  • Relevant config (redacted): default TUI config

Steps

  1. Send a local prompt, then trigger a session reload/reconnect or history rebuild path.
  2. Exercise error/final cleanup paths for the active run.
  3. Render long links/paths in the TUI transcript.

Expected

  • Pending local sends remain visible and reconcile cleanly.
  • Busy/error state returns to a sensible status.
  • Long terminal-style text keeps more horizontal width.

Actual

  • Before this change, pending sends could disappear and later reappear, busy/error handling could become misleading, and transcript padding wasted horizontal space.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: focused TUI tests passed, pnpm build passed, and the rebased branch was run locally for interactive TUI validation.
  • Edge cases checked: pending-send reconciliation on history rebuild, no-active-run Esc/abort handling, and error/final cleanup paths.
  • What you did not verify: full Pi-style queued steer/follow-up runtime semantics; that remains follow-up work.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: TUI state handling remains easy to regress because optimistic sends, history replay, and run lifecycle events are loosely coupled.
    • Mitigation: added focused tests around chat-log reconciliation, editor handling, and event/session cleanup.
  • Risk: full Pi-style queue/runtime semantics are still not present.
    • Mitigation: call that scope boundary out explicitly rather than implying this PR solves the larger parity effort.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/tui/components/assistant-message.ts (modified, +1/-1)
  • src/tui/components/chat-log.test.ts (modified, +57/-0)
  • src/tui/components/chat-log.ts (modified, +104/-1)
  • src/tui/components/custom-editor.test.ts (added, +32/-0)
  • src/tui/components/custom-editor.ts (modified, +5/-0)
  • src/tui/components/markdown-message.ts (modified, +5/-4)
  • src/tui/components/pending-messages.test.ts (added, +25/-0)
  • src/tui/components/pending-messages.ts (added, +35/-0)
  • src/tui/tui-types.ts (modified, +9/-0)
RAW_BUFFERClick to expand / collapse

Summary

Messages typed or pasted into the TUI disappear silently — no response, no error, and the message is not visible in the conversation history afterwards. The user watches the message vanish from the screen while looking at it.

This is distinct from the existing input-swallowed-during-generation bug (#45326). This happens even when the agent is idle.

Steps to reproduce

  1. Open TUI (openclaw tui)
  2. Type or paste a message while agent is connected | idle
  3. Press Enter
  4. Message appears briefly then vanishes — not in history, no reply, no error

Expected behavior

Message should appear in history and agent should respond. If something fails, an error should be shown — not silent disappearance.

Impact

Combined with the exec approval popup flood and NO_REPLY issues from 2026.4.1, the TUI is completely unusable. User cannot type commands, cannot get responses, and cannot run exec. A full working day lost.

Environment

  • Version: 2026.4.1
  • Platform: macOS TUI (openclaw tui)
  • Agent: Arthur (main), model: kimi-coding/k2p5
  • Related: #45326, #59008

extent analysis

TL;DR

The issue may be resolved by investigating and fixing the underlying cause of the message disappearance in the TUI, potentially related to the existing input-swallowed-during-generation bug or other issues like the exec approval popup flood and NO_REPLY problems.

Guidance

  • Investigate the relationship between this issue and the existing input-swallowed-during-generation bug (#45326) to determine if they share a common root cause.
  • Review the TUI code and logs to identify why the message is being removed from the conversation history and why no error is being displayed.
  • Consider temporarily downgrading to a previous version of the software (if available) to see if the issue persists, which could help isolate the problem to a specific version or change.
  • Look into the exec approval popup flood and NO_REPLY issues from 2026.4.1, as they might be interconnected with the current problem, affecting the overall usability of the TUI.

Example

No specific code snippet can be provided without more details on the TUI's implementation, but checking the event handlers for the Enter key press and the message rendering logic could offer insights into why messages disappear.

Notes

The issue seems to be part of a larger set of problems affecting the usability of the TUI in version 2026.4.1, including the exec approval popup flood and NO_REPLY issues. Resolving these issues may require a comprehensive review of the TUI's functionality and interaction with the agent and model.

Recommendation

Apply a workaround, such as using an alternative interface if available, or temporarily reverting to a previous version of the software if the issues are specific to version 2026.4.1, to mitigate the impact on usability until a fix can be implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Message should appear in history and agent should respond. If something fails, an error should be shown — not silent disappearance.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING