openclaw - ✅(Solved) Fix [Bug]: Control UI /think command crashes [1 pull requests, 3 comments, 4 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#52105Fetched 2026-04-08 01:15:36
View on GitHub
Comments
3
Participants
4
Timeline
7
Reactions
0
Author
Timeline (top)
commented ×3labeled ×2cross-referenced ×1referenced ×1

The command is "swallowed" - it disappears from the input without any response. Error only appears in browser console (F12).

Other slash commands like /model work fine.

Error Message

The command is "swallowed" - it disappears from the input without any response. Error only appears in browser console (F12).

Root Cause

The command is "swallowed" - it disappears from the input without any response. Error only appears in browser console (F12).

Other slash commands like /model work fine.

Fix Action

Fixed

PR fix notes

PR #52113: fix(ui): catch unhandled errors in slash command dispatch

Description (problem / solution / changelog)

Summary

  • Wrap executeSlashCommand() in a try/catch inside dispatchSlashCommand() so unhandled errors are displayed as inline system messages instead of being silently swallowed
  • Show an explicit "not connected" message when host.client is null instead of returning silently

Root Cause

When executeSlashCommand() threw an unhandled error (e.g. from a disconnected WebSocket, unexpected RPC response shape, or provider-specific failures), the user's input was already cleared (line 230–232) but no result was injected into the chat. The command appeared to vanish — the error was only visible in the browser DevTools console.

This affected /think, /model, /compact, /status, /usage, and all other locally-executed slash commands.

Test plan

  • Type /think when gateway is disconnected → should show "not connected" message
  • Type /think when gateway returns unexpected response → should show inline error
  • Type /model normally → should still work as before
  • Type /think high → should still set thinking level

Fixes #52105

🤖 Generated with Claude Code

Changed files

  • ui/src/ui/app-chat.ts (modified, +14/-2)
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Summary

The command is "swallowed" - it disappears from the input without any response. Error only appears in browser console (F12).

Other slash commands like /model work fine.

Environment

  • OpenClaw: 2026.3.13
  • Browser: Chrome latest
  • OS: Windows

Steps to reproduce

  1. Open Control UI
  2. Type /think in chat input
  3. Press Enter
  4. Message disappears, no response

(but it can work in Feishu chat)

Image

Expected behavior

Image should respond the think level.

Actual behavior

nothing happen, it was swallowed

OpenClaw version

2026.3.13

Operating system

Windows 10

Install method

No response

Model

any

Provider / routing chain

Aliyun Coding Plan/Qwen 3.5 Plus

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue of the /think command being "swallowed" without any response, we need to:

  • Check the command handler for /think and ensure it's properly registered and handled.
  • Verify that there are no JavaScript errors in the browser console that could prevent the command from executing.
  • Ensure that the command is correctly formatted and sent to the server.

Example Code Changes

// Check if the command handler is properly registered
const commandHandlers = {
  // ... other command handlers ...
  '/think': handleThinkCommand
};

function handleThinkCommand(message) {
  // Implement the logic for the /think command
  console.log('Handling /think command');
  // Return a response to the user
  return 'Think level: ...';
}

Temporary Workaround

If the issue persists, try logging the command handler execution to see if it's being called:

function handleThinkCommand(message) {
  console.log('Handling /think command');
  try {
    // Implement the logic for the /think command
    // ...
  } catch (error) {
    console.error('Error handling /think command:', error);
  }
}

Verification

To verify that the fix worked:

  • Open the Control UI and type /think in the chat input.
  • Press Enter and check if the command is executed correctly and a response is returned.
  • Check the browser console for any JavaScript errors.

Extra Tips

  • Ensure that the command handler is properly registered and that there are no typos in the command name.
  • Use the browser console to debug and log any errors that may occur during command execution.

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

Image should respond the think level.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING