Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After v2026.5.2, typing /new in the Control UI (webchat) no longer fires command:new internal hooks because commit 37aebf612b rerouted it from sendChatMessageNow(host, "/new") (which went through Gateway command dispatch → hooks) to host.onSlashAction("new-session") → createSessionAndRefresh() → sessions.create (which fires zero hooks).
This breaks:
- The bundled
session-memory hook — no memory file is written on /new
- Any custom managed/workspace hooks listening on
command:new
- The
before_reset plugin hook chain
This is the Control UI equivalent of #49918 (TUI /new hooks regression). The TUI bug was introduced in v2026.3.7 by a different commit; this one was introduced in v2026.5.2 by 37aebf612b which fixed #69599.
Steps to reproduce
- Enable the bundled
session-memory hook (openclaw hooks enable session-memory)
- Have a conversation in the Control UI webchat
- Type
/new in the chat input
- Check
<workspace>/memory/ — no new memory file is created
- Check gateway logs — no
hooks/session-memory log entries after the /new
- For comparison: type
/reset in a session — memory file IS created, hooks fire correctly
Expected behavior
Typing /new in the Control UI should:
- Fire
command:new internal hooks (and before_reset plugin hooks) against the previous session before switching to the new one
- Write the previous session's transcript to a memory file via the bundled
session-memory hook
- Create a new empty session and switch to it
- Feel like starting a fresh conversation
Actual behavior
Control UI /new calls sessions.create via WebSocket, which:
- Creates a fresh session entry but does not fire any hooks
- The new session appears but nothing else happens
- No memory file is written for the previous session
- No custom hooks fire
- No
before_reset or session_end plugin hooks fire
- User sees an empty session but the old session's context is silently discarded
The old session's transcript is never captured to memory.
Root cause
Commit 37aebf612b ("fix(control-ui): create sessions for typed /new", fixing #69599) changed the /new dispatch in ui/src/ui/app-chat.ts:
Before:
case "new":
await sendChatMessageNow(host, "/new", { refreshSessions: true, ... });
return;
After:
case "new":
if (!host.onSlashAction) {
host.lastError = "New Chat is unavailable.";
return;
}
await host.onSlashAction("new-session");
return;
The old path went through sendChatMessageNow → Gateway command dispatch → command:new hooks. The new path bypasses hooks entirely and goes straight to sessions.create.
Impact and severity
- Severity: High — Users rely on
/new to start fresh conversations. When hooks don't fire:
- Session memory is lost (previous context never saved)
- Custom automation hooks don't run
- The command feels "broken" — user types
/new and nothing visibly happens beyond an empty session appearing
- This is a silent data loss bug — the old session's transcript is discarded without any warning
OpenClaw version
2026.5.2 (and later)
Operating system
Linux
Install method
nonessential
Model
nonessential
Provider / routing chain
nonessential
Config file / key location
No response
Logs, screenshots, and evidence
From gateway logs — hooks/session-memory entries are missing after /new:
// After /reset — hooks fire ✅
[hooks] fired command:reset → session-memory
[session-memory] wrote memory/2026-05-05.md
// After /new — hooks fire ✅ (before regression)
[hooks] fired command:new → session-memory
[session-memory] wrote memory/2026-05-05.md
// After /new — no hooks ❌ (current behavior)
[session-memory] <completely absent>
Additional information
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After v2026.5.2, typing
/newin the Control UI (webchat) no longer firescommand:newinternal hooks because commit37aebf612brerouted it fromsendChatMessageNow(host, "/new")(which went through Gateway command dispatch → hooks) tohost.onSlashAction("new-session")→createSessionAndRefresh()→sessions.create(which fires zero hooks).This breaks:
session-memoryhook — no memory file is written on/newcommand:newbefore_resetplugin hook chainThis is the Control UI equivalent of #49918 (TUI
/newhooks regression). The TUI bug was introduced in v2026.3.7 by a different commit; this one was introduced in v2026.5.2 by37aebf612bwhich fixed #69599.Steps to reproduce
session-memoryhook (openclaw hooks enable session-memory)/newin the chat input<workspace>/memory/— no new memory file is createdhooks/session-memorylog entries after the/new/resetin a session — memory file IS created, hooks fire correctlyExpected behavior
Typing
/newin the Control UI should:command:newinternal hooks (andbefore_resetplugin hooks) against the previous session before switching to the new onesession-memoryhookActual behavior
Control UI
/newcallssessions.createvia WebSocket, which:before_resetorsession_endplugin hooks fireThe old session's transcript is never captured to memory.
Root cause
Commit
37aebf612b("fix(control-ui): create sessions for typed /new", fixing #69599) changed the/newdispatch inui/src/ui/app-chat.ts:Before:
After:
The old path went through
sendChatMessageNow→ Gateway command dispatch →command:newhooks. The new path bypasses hooks entirely and goes straight tosessions.create.Impact and severity
/newto start fresh conversations. When hooks don't fire:/newand nothing visibly happens beyond an empty session appearingOpenClaw version
2026.5.2 (and later)
Operating system
Linux
Install method
nonessential
Model
nonessential
Provider / routing chain
nonessential
Config file / key location
No response
Logs, screenshots, and evidence
From gateway logs —
hooks/session-memoryentries are missing after/new:Additional information
/newhook emissionemitCommandHooks: booleanopt-in param tosessions.create/newflow sets it totrue; external SDK callers do not/newhooks regression), [Bug]: Control UI /new, /reset, and New Session do not create the same true fresh session as direct session creation #69599 (original fix that introduced this regression), docs: "/reset is the reset alias" is misleading — /new and /reset are not aliases #76592 (docs clarification)