Skip to content

[Bug]: Bare /new and /reset no longer trigger the persona greeting in 2026.5.3 (regression vs 4.x)** #77733

Closed as not planned

Description

@jw8957

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

Activity

  1. clawsweeper commented on May 5, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep this issue open for the optional startup-turn decision expressly reserved by a maintainer; acknowledgement-only bare resets remain intentional.

    Reproducibility: Current source proves the reported acknowledgement without model execution, and inspected boundary tests encode it; no live reproduction was run, and this is intentional behavior.

    Root-cause cluster
    Relationship: canonical
    Canonical: #77733
    Summary: This issue remains the explicitly retained tracker for optional reset startup turns.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Maintainer decision needed

    • Question: Should bare /new and /reset support an explicit opt-in persona startup turn?
    • Recommendation: Support an explicit startup-turn opt-in: Define one minimal contract at the existing reset owner, preserving current defaults, hook delivery, and ACP behavior.
    • Why: A maintainer expressly retained this question, while current source, documentation, and tests deliberately require acknowledgement-only behavior.

    Next step
    Maintainers must decide whether to support an optional persona startup turn before choosing its interface or changing the reset contract.

    Review details

    Best possible solution:

    If maintainers sponsor startup greetings, provide a minimal opt-in through the existing reset owner while preserving acknowledgement-only defaults.

    Do we have a high-confidence way to reproduce the issue?

    Current source proves the reported acknowledgement without model execution, and inspected boundary tests encode it; no live reproduction was run, and this is intentional behavior.

    Is this the best way to solve the issue?

    An explicit opt-in is safer than unconditional fallthrough because the existing short-circuit prevents empty provider calls, but its interface requires the reserved maintainer decision.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The product contract and extension surface for an optional startup turn remain undecided.

    Codex review notes: model internal, reasoning medium; reviewed against 885bd760863b.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P3: This is optional reset ergonomics under an intentional contract, with explicit follow-up instructions already supported.
    • impact:ux-friction: Persona users must explicitly request their briefing instead of receiving it automatically after a bare reset.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 15, 2026, 7:45 PM ET / 23:45 UTC.

  2. jw8957 commented on May 5, 2026

    @jw8957
    Author

    Quick clarifying question before this gets triaged either way — looking at src/auto-reply/reply/commands-reset.ts and the matching test commands-reset-hooks.test.ts, the new test case is literally titled

    "acknowledges bare /new without falling through to model execution"

    so it looks like the 5.3 short-circuit is intentional, not an accidental regression. If that's correct, could you say a bit about the reasoning?
    A couple things I'd love to understand:

    1. Was the goal to avoid spending an LLM turn on every bare /new? That would make sense for channel plugins with passive users where greetings aren't desired and tokens add up.
    2. Is bare /new = clear session, no LLM turn the new mental model, with /new <task> being the "and run something" form? If so, this is more of a docs / migration issue than a behavior question.
    3. Is there an existing hook or extension point I'm missing that lets a persona / agent opt back into running an LLM turn on bare /new?

    Context for why I care — I'm running a Feishu-based personal assistant with a SOUL.md-style persona. In 4.x bare /new was the natural trigger for a "morning sync" greeting: the user types /new, the agent runs a full turn, reads daily memory + heartbeat, and produces a recap. That flow disappeared in 5.3-1 because the short-circuit returns the canned text before isBareSessionReset has a chance to run.

    I have a local perl patch that drops the short-circuit and restores 4.x fall-through behavior, which works, but re-applying it on every upgrade is exactly the brittle pattern CONTRIBUTING.md warns against. So before I either keep patching dist/ or send a PR, I'd like to understand the intended replacement path.

    If the answer is "this was deliberate, please use /new <task> instead", that's a perfectly fine answer and I'll adjust. If the answer is "we'd accept an opt-in config to restore the old fall-through", I'd be happy to send that PR. Want to make sure I'm not building something that goes against the design intent.

  3. COOLBGT commented on May 8, 2026

    @COOLBGT

    Adding a current-data point from v2026.5.7.

    I reproduced the same behavior locally: a bare /new in WebChat returned only the static ✅ New session started. ack and did not start the startup/model turn.

    I applied a local hotfix to the installed dist bundle by removing the bare-reset short-circuit in maybeHandleResetCommand():

    if (!resetTail) return {
      shouldContinue: false,
      reply: { text: "✅ New session started." }
    };

    and letting that path fall through with:

    return null;

    On my installed build the patched file was:

    /usr/lib/node_modules/openclaw/dist/commands.runtime-CgyQNBCx.js
    

    After restarting the gateway and running node --check on the patched bundle, bare /new again produced a real fresh startup turn instead of only the canned ack. I verified this by starting a new WebChat session: the agent received the fresh-session startup flow and greeted from its configured persona/context.

    So at least for the WebChat/control-ui path, removing the short-circuit restores the old 4.x-style behavior. Obviously patching dist/ is only a workaround and will be overwritten by npm/self-updates, but it may help confirm the suspected fix direction.

    My preference would be either:

    1. restore the historical fall-through behavior for bare /new / /reset, or
    2. add an opt-in config like bareReset.mode = "ack" | "startupTurn" so personal-assistant/persona setups can keep using /new as a fresh greeting/sync trigger without local patches.
  4. Tony-ooo commented on May 12, 2026

    @Tony-ooo

    Additional Source Code Analysis

    I traced the exact code path and confirmed the root cause. Here's the full chain:

    1. Short-circuit in maybeHandleResetCommand

    File: dist/commands.runtime-*.js (line ~136)

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

    When resetTail is empty (bare /new or /reset), this returns shouldContinue: false with a static reply. The command handler in get-reply-*.js (line ~1564) then exits immediately:

    if (!commandResult.shouldContinue) {
        typing.cleanup();
        return { kind: "reply", reply: commandResult.reply };
    }

    No LLM turn runs at all.

    2. isBareSessionReset detection exists but is never reached

    File: dist/get-reply-*.js (line ~2180)

    const isBareNewOrReset = /^\/(new|reset)$/.test(normalizedCommandBody);
    const isBareSessionReset = softResetTriggered || isNewSession && (baseBodyTrimmedRaw.length === 0 && rawBodyTrimmed.length > 0 || isBareNewOrReset);

    The isBareSessionReset flag is correctly set, and the startup context prelude is computed:

    // line ~2200
    const startupContextPrelude = isBareSessionReset && bareResetPromptState?.shouldPrependStartupContext !== false && shouldApplyStartupContext({ cfg, action: startupAction })
        ? await buildSessionStartupContextPrelude({ workspaceDir, cfg }) : null;

    This would inject daily memory files (memory/YYYY-MM-DD.md) into the prompt. But this code is never reached because the short-circuit in maybeHandleResetCommand exits before runPreparedReply is called.

    3. The reset prompt tells the agent to read files, but the agent never runs

    File: dist/startup-context-*.js (line ~11)

    const BARE_SESSION_RESET_PROMPT_BASE = "A new session was started via /new or /reset. Execute your Session Startup sequence now - read the required files before responding to the user...";

    This prompt is built and would be injected as baseBodyFinal when isBareSessionReset is true. But again, the agent never runs to receive it.

    Summary

    The 5.3 short-circuit in maybeHandleResetCommand returns shouldContinue: false before the entire runPreparedReply pipeline executes. This means:

    1. No LLM turn
    2. No startup context prelude (daily memory files) injected
    3. No persona greeting
    4. No BARE_SESSION_RESET_PROMPT_BASE instructions sent to the model

    The fix is to remove or make configurable the if (!resetTail) return { shouldContinue: false, ... } branch so bare /new / /reset falls through to the normal LLM turn.

  5. jw8957 commented on May 23, 2026

    @jw8957
    Author

    Returning to this — given the test name "acknowledges bare /new without falling through to model execution" in commands-reset-hooks.test.ts, the 5.3 short-circuit is clearly intentional rather than accidental. So a straight revert isn't the right path, which is probably why #81939 has stalled on the bot's "needs changes" feedback.

    Proposal: instead of reverting, add an opt-in so persona-based agents can keep the 4.x fallthrough behavior, while the 5.3 ack-only default stays untouched.

    Two audiences, both legitimate:

    • Channel-plugin / passive chat users → bare /new = cheap ack, no LLM turn (current 5.3 default — keep it)
    • Persona / agent-runtime users → bare /new = "run the session-start turn so the agent reads SOUL.md / daily memory / heartbeat and produces a real greeting" (4.x behavior — needs to be reachable again)

    Concrete API shapes maintainers might pick from:

    # Option A — global config knob
    commands:
      bareReset:
        mode: "ack"           # default, current 5.3 behavior
        # mode: "startupTurn" # restores 4.x: runs LLM turn with BARE_SESSION_RESET_PROMPT_BASE
    
    # Option B — per-agent flag (composes with multi-agent setups)
    agents.<name>.bareResetMode: "ack" | "startupTurn"
    
    # Option C — extend the existing reset-hook contract
    # Let a hook return { shouldContinue: true } even when resetTail is empty,
    # i.e. an agent opts in by registering a hook rather than via static config.
  6. added
    P2Normal backlog priority with limited blast radius.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    on Jun 14, 2026
  7. 23 remaining items

  8. added
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.
    and removed
    P2Normal backlog priority with limited blast radius.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    on Aug 9, 2026
  9. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    Thanks for filing this. We're closing older issues that no longer look actionable on current main.

    Acknowledgement-only bare /new and /reset is intentional now; adding text after the command (for example /new good morning) still starts a model turn. Please open a fresh feature request for an opt-in startup turn if you still want one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.bugSomething isn't workingclawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions