openclaw - ✅(Solved) Fix [Bug]: Bare `/new` and `/reset` no longer trigger the persona greeting in 2026.5.3 (regression vs 4.x)** [1 pull requests, 2 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#77733Fetched 2026-05-06 06:22:19
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
2
Author
Timeline (top)
commented ×2labeled ×2referenced ×2cross-referenced ×1

Root Cause

Root Cause (suspected)

Fix Action

Workaround

Locally patching the dist file to remove the short-circuit restores the greeting behavior. Reproducible patch:

perl -0777 -i -pe 's/\tif \(!resetTail\) return \{\n\t\tshouldContinue: false,\n\t\t\.\.\.hookResult\.routedReply \? \{\} : \{ reply: \{ text: commandAction === "reset" \? "✅ Session reset\." : "✅ New session started\." \} \}\n\t\};\n\treturn null;/\treturn null;/' \
  ~/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands.runtime-*.js
systemctl --user restart openclaw-gateway


After the patch, bare `/new` again triggers the persona greeting. Confirmed working on `2026.5.3-1`.

PR fix notes

PR #77758: [AI-assisted] fix(commands): restore LLM fallthrough on bare /new and /reset

Description (problem / solution / changelog)

Summary

Fixes #77733

Bare /new and /reset commands were short-circuited in 2026.5.3 to return a canned "✅ New session started." / "✅ Session reset." acknowledgment, skipping the LLM turn entirely. This broke the established 4.x behavior where bare reset commands fall through to the agent loop so the persona greeting fires.

Root Cause

In src/auto-reply/reply/commands-reset.ts, the !resetTail branch (added in 5.3) returned { shouldContinue: false, reply: { text: "..." } } for bare /new and /reset, preventing the request from reaching the LLM turn. In 4.x, this code path returned null, allowing fallthrough to isBareSessionReset → normal LLM turn → persona greeting.

Fix

Remove the canned-reply branch for bare resets and return null instead, letting the request continue to the LLM turn. Hook-routed replies are still honored (shouldContinue: false when hookResult.routedReply is set).

Files changed:

  • src/auto-reply/reply/commands-reset.ts — remove canned reply short-circuit for bare resets
  • src/auto-reply/reply/commands-reset-hooks.test.ts — update test expectations to match restored fallthrough behavior

Regression Test Plan

  • Existing test suite updated and passing (12/12 tests pass)
  • Bare /reset now returns null (falls through to LLM turn)
  • Bare /new now returns null (falls through to LLM turn)
  • /reset with hook-routed reply still returns { shouldContinue: false }
  • /new <tail> still falls through correctly (unchanged)

Security Impact

None. This restores prior behavior — no new code paths, no auth changes, no new inputs accepted.

Changed files

  • src/auto-reply/reply/commands-reset-hooks.test.ts (modified, +4/-10)
  • src/auto-reply/reply/commands-reset.ts (modified, +9/-10)

Code Example

// 5.3 introduced this branch
if (!resetTail) return {
    shouldContinue: false,
    ...hookResult.routedReply ? {} : { reply: { text: commandAction === "reset" ? "✅ Session reset." : "✅ New session started." } }
};
return null;

---

perl -0777 -i -pe 's/\tif \(!resetTail\) return \{\n\t\tshouldContinue: false,\n\t\t\.\.\.hookResult\.routedReply \? \{\} : \{ reply: \{ text: commandAction === "reset" \? "✅ Session reset\." : "✅ New session started\." \} \}\n\t\};\n\treturn null;/\treturn null;/' \
  ~/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands.runtime-*.js
systemctl --user restart openclaw-gateway


After the patch, bare `/new` again triggers the persona greeting. Confirmed working on `2026.5.3-1`.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Problem

In OpenClaw 2026.5.3 (and 2026.5.3-1), running a bare /new or /reset command (with no trailing instructions) no longer triggers the persona greeting from the agent. Instead, the user gets a canned text reply ✅ New session started. / ✅ Session reset. and no LLM turn runs.

This breaks the established UX where a freshly-reset session greets the user via the agent's configured persona (SOUL.md / system prompt). For users who rely on the greeting as a "morning sync"-style summary, this is a meaningful regression.

Steps to reproduce

  1. Configure an agent with a persona that produces a greeting on BARE_SESSION_RESET (we have agents.defaults.bootstrapTotalMaxChars etc. set so the persona has enough context to write a real greeting).
  2. From any chat surface, send exactly /new (or /reset).
  3. Expected: agent runs an LLM turn and replies with the persona greeting (covers daily memory, current todos, etc.).
  4. Actual: gateway returns the canned ✅ New session started. text and the LLM turn is skipped entirely.

Expected behavior

One of the following:

  1. Restore 4.x behavior (preferred): bare /new / /reset falls through to the LLM turn, agents that have a persona-driven greeting see it run as before.
  2. Make it configurable: e.g. agents.defaults.commands.bareReset.mode = "greeting" | "canned" (default "greeting" to match historical behavior), or a per-handler hook so configs that want the canned reply opt in.

The current behavior makes it impossible to use /new as a normal "reset and re-greet" trigger without patching dist/, which is brittle across upgrades.

Actual behavior

the user gets a canned text reply ✅ New session started. / ✅ Session reset. and no LLM turn runs.

OpenClaw version

2026.5.3-1

Operating system

Ubuntu 20.04

Install method

No response

Model

claude-opus-4-7

Provider / routing chain

feishu -> openclaw -> claude

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Root Cause (suspected)

dist/commands.runtime-*.js was changed in 5.3 to add a short-circuit branch immediately after emitResetCommandHooks(...):

// 5.3 introduced this branch
if (!resetTail) return {
    shouldContinue: false,
    ...hookResult.routedReply ? {} : { reply: { text: commandAction === "reset" ? "✅ Session reset." : "✅ New session started." } }
};
return null;

In 4.x, the corresponding code path returned null for bare /new and /reset, so the request fell through to isBareSessionReset → the normal LLM turn → the persona greeting.

In 5.3, when resetTail is empty (bare /new), the new branch returns shouldContinue: false with the canned text, so the LLM turn never runs.

Workaround

Locally patching the dist file to remove the short-circuit restores the greeting behavior. Reproducible patch:

perl -0777 -i -pe 's/\tif \(!resetTail\) return \{\n\t\tshouldContinue: false,\n\t\t\.\.\.hookResult\.routedReply \? \{\} : \{ reply: \{ text: commandAction === "reset" \? "✅ Session reset\." : "✅ New session started\." \} \}\n\t\};\n\treturn null;/\treturn null;/' \
  ~/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands.runtime-*.js
systemctl --user restart openclaw-gateway


After the patch, bare `/new` again triggers the persona greeting. Confirmed working on `2026.5.3-1`.

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The most likely fix is to remove the short-circuit branch in commands.runtime-*.js that returns a canned text reply for bare /new and /reset commands, allowing the request to fall through to the normal LLM turn and persona greeting.

Guidance

  • Identify the commands.runtime-*.js file in the OpenClaw installation and locate the short-circuit branch introduced in version 5.3.
  • Remove or modify the branch to return null instead of shouldContinue: false with a canned text reply, allowing the request to proceed to the LLM turn.
  • Restart the OpenClaw gateway service after applying the patch to ensure the changes take effect.
  • Test the fix by sending a bare /new or /reset command and verifying that the persona greeting is triggered as expected.

Example

The provided workaround patch using perl can be used as a reference to remove the short-circuit branch:

perl -0777 -i -pe 's/\tif \(!resetTail\) return \{\n\t\tshouldContinue: false,\n\t\t\.\.\.hookResult\.routedReply \? \{\} : \{ reply: \{ text: commandAction === "reset" \? "✅ Session reset\." : "✅ New session started\." \} \}\n\t\};\n\treturn null;/\treturn null;/' \
  ~/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands.runtime-*.js

Notes

This fix assumes that the short-circuit branch is the root cause of the issue and that removing it will restore the desired behavior. However, this is a temporary workaround, and a more permanent solution may be required in the future.

Recommendation

Apply the workaround patch to remove the short-circuit branch, as it has been

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

One of the following:

  1. Restore 4.x behavior (preferred): bare /new / /reset falls through to the LLM turn, agents that have a persona-driven greeting see it run as before.
  2. Make it configurable: e.g. agents.defaults.commands.bareReset.mode = "greeting" | "canned" (default "greeting" to match historical behavior), or a per-handler hook so configs that want the canned reply opt in.

The current behavior makes it impossible to use /new as a normal "reset and re-greet" trigger without patching dist/, which is brittle across upgrades.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING