openclaw - 💡(How to fix) Fix TUI local mode advertises /status and /compact but falls through to model text [1 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#71592Fetched 2026-04-26 05:11:00
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

In OpenClaw TUI local embedded mode, typed slash commands such as /status and /compact are parsed by the TUI slash submit path but are not implemented by the TUI local command switch. They fall through to sendMessage(raw), appear as user messages, and start a local embedded agent/model run.

This is a TUI local-mode repro, not a Control UI/WebChat repro.

Root Cause

In OpenClaw TUI local embedded mode, typed slash commands such as /status and /compact are parsed by the TUI slash submit path but are not implemented by the TUI local command switch. They fall through to sendMessage(raw), appear as user messages, and start a local embedded agent/model run.

This is a TUI local-mode repro, not a Control UI/WebChat repro.

Code Example

openclaw --no-color tui --local --session tui-slash-probe --timeout-ms 12000
RAW_BUFFERClick to expand / collapse

Summary

In OpenClaw TUI local embedded mode, typed slash commands such as /status and /compact are parsed by the TUI slash submit path but are not implemented by the TUI local command switch. They fall through to sendMessage(raw), appear as user messages, and start a local embedded agent/model run.

This is a TUI local-mode repro, not a Control UI/WebChat repro.

Environment

  • OpenClaw: 2026.4.23 (a979721)
  • Mode: openclaw tui --local
  • OS: macOS
  • Install: npm global / Homebrew Node global path

Repro

  1. Start a throwaway local TUI session:

    openclaw --no-color tui --local --session tui-slash-probe --timeout-ms 12000
  2. Type /status and press Enter.

  3. Observe that /status appears as a user turn and the local embedded agent run starts (running / streaming), instead of rendering a TUI/local status response.

  4. Repeat with /compact; it also appears as a user turn and starts a model run.

Static evidence from installed dist

  • dist/tui-cli-tVLA9DkU.js: submitted text starting with / calls handleCommand(value).
  • dist/tui-cli-tVLA9DkU.js: parseCommand() parses /status to status and /compact to compact.
  • dist/tui-cli-tVLA9DkU.js: handleCommand(raw) switches on a hardcoded local subset and has no status or compact cases.
  • dist/tui-cli-tVLA9DkU.js: the default branch does await sendMessage(raw).
  • dist/tui-cli-tVLA9DkU.js: in --local, sendMessage calls EmbeddedTuiBackend.sendChat(), which calls agentCommandFromIngress(...) directly, bypassing gateway chat.send.
  • dist/commands-registry.data-SU8xq2YS.js: the command registry contains both /status and /compact, so they are advertised through autocomplete.

Expected

Known slash commands advertised by TUI should not be sent to the model as ordinary user text.

Acceptable fixes:

  • implement local TUI handlers for /status and /compact;
  • route known commands through a shared command execution adapter;
  • or stop advertising unsupported commands and show an explicit "not supported in local TUI mode" response.

Actual

/status and /compact are delivered to the local embedded model path as ordinary user prompts.

Gateway-connected TUI contrast

Gateway-connected TUI still submits typed slash input through the same TUI handleCommand switch. For unsupported local switch cases, it also falls through to sendMessage(raw). However, the gateway chat.send path routes command-looking input through shared command handlers that include /status and /compact, so gateway mode can recover these commands. Local embedded mode bypasses that recovery path.

Related

  • #7202 is an older closed cross-interface report and does not cover the current local embedded TUI fallthrough.
  • #51270 shows nearby TUI command parser gaps for /model.
  • #61966 is autocomplete-only and does not address execution.
  • #59871 and #49918 are TUI-specific but cover different command/display behavior.

Regression tests

  • TUI local /status should not call sendChat / agentCommandFromIngress.
  • TUI local /compact should not call sendChat / agentCommandFromIngress.
  • Every command returned by TUI autocomplete should have a local handler, shared command adapter route, or explicit unsupported-command response.

extent analysis

TL;DR

Implement local TUI handlers for /status and /compact or route known commands through a shared command execution adapter to prevent them from being sent to the model as ordinary user text.

Guidance

  • Review the handleCommand function in dist/tui-cli-tVLA9DkU.js to understand how slash commands are currently handled in local TUI mode.
  • Consider adding cases for /status and /compact in the handleCommand switch to implement local handlers for these commands.
  • Alternatively, explore routing known commands through a shared command execution adapter to handle them consistently across different modes.
  • Verify that the command registry in dist/commands-registry.data-SU8xq2YS.js is updated to reflect any changes made to command handling.

Example

// Example of adding a case for /status in handleCommand
switch (command) {
  // ...
  case 'status':
    // Implement local handler for /status
    break;
  // ...
}

Notes

The current implementation bypasses the gateway chat.send path in local embedded mode, which allows commands to fall through to sendMessage(raw). Addressing this issue will require changes to the local TUI command handling logic.

Recommendation

Apply a workaround by implementing local TUI handlers for /status and /compact to prevent them from being sent to the model as ordinary user text. This approach will ensure that known commands are handled correctly in local TUI mode.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING