openclaw - ✅(Solved) Fix Verbose mode sends duplicate "New session" notices, may confuse agent into double replies [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#55515Fetched 2026-04-08 01:38:40
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2referenced ×2commented ×1

When verbose mode is enabled, running /new triggers TWO "new session" notifications:

  1. pi-embedded: ✅ New session started · model: xxx (from sendResetSessionNotice)
  2. agent-runner: 🧭 New session: <sessionId> (from verboseNotices)

Root Cause

When verbose mode is enabled, running /new triggers TWO "new session" notifications:

  1. pi-embedded: ✅ New session started · model: xxx (from sendResetSessionNotice)
  2. agent-runner: 🧭 New session: <sessionId> (from verboseNotices)

Fix Action

Fixed

PR fix notes

PR #55543: fix: suppress duplicate verbose session notice when reset already notified (#55515)

Description (problem / solution / changelog)

Summary

  • Fixes #55515
  • When /new is triggered with verbose mode, both pi-embedded and agent-runner sent separate "new session" notices
  • Added guard to skip the verbose 🧭 New session notice when resetTriggered is true, since pi-embedded already sends a more informative notice

Test plan

  • Enable verbose mode
  • Trigger /new command
  • Verify only one "new session" notice is sent (pi-embedded's ✅ New session started)

Changed files

  • src/auto-reply/reply/agent-runner.media-paths.test.ts (modified, +1/-0)
  • src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts (modified, +112/-0)
  • src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts (modified, +2/-0)
  • src/auto-reply/reply/agent-runner.ts (modified, +4/-1)
  • src/auto-reply/reply/get-reply-run.ts (modified, +9/-3)

PR #55593: fix(auto-reply): suppress verbose 'New session' notice when resetTrig…

Description (problem / solution / changelog)

Fixes #55515

Problem
When verbose mode is enabled, running /new triggers TWO "new session" notices:

  • pi-embedded: "✅ New session started..." (from sendResetSessionNotice)
  • agent-runner: "🧭 New session: ..." (from verboseNotices)

This can confuse the agent into treating them as separate user messages and replying twice.

Solution
Suppress the verbose "🧭 New session" notice when resetTriggered is true, since the pi-embedded notice already covers session reset with more detail.

Changes:

  • agent-runner.ts: Add resetTriggered?: boolean param; check !resetTriggered before adding verbose new session notice
  • get-reply-run.ts: Pass resetTriggered to runReplyAgent
  • Add test verifying suppression

Testing:

  • New test added to agent-runner.misc.runreplyagent.test.ts
  • All affected files passed pnpm check (format, typecheck, lint)

Changed files

  • src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts (modified, +70/-0)
  • src/auto-reply/reply/agent-runner.ts (modified, +3/-1)
  • src/auto-reply/reply/get-reply-run.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Summary

When verbose mode is enabled, running /new triggers TWO "new session" notifications:

  1. pi-embedded: ✅ New session started · model: xxx (from sendResetSessionNotice)
  2. agent-runner: 🧭 New session: <sessionId> (from verboseNotices)

Code References

NoticeSource FileTrigger
✅ New session startedpi-embedded-CbCYZxIb.js:92452resetTriggered && isAuthorizedSender
🧭 New sessionagent-runner.runtime-qTIVwaGN.js:2305verboseEnabled && activeIsNewSession

Impact

Since these two notices arrive at different times, the agent may interpret them as separate user messages and respond twice to the "new session" event.

Question

Is this expected behavior or a bug? Should the verbose 🧭 New session notice be suppressed when resetTriggered is true (since pi-embedded already sends a more informative notice)?

Environment

  • OpenClaw version: 2026.3.23-2
  • Channel: Telegram
  • Verbose: on

extent analysis

Fix Plan

To prevent duplicate "new session" notifications, we need to suppress the verbose 🧭 New session notice when resetTriggered is true.

Code Changes

We will modify the agent-runner.runtime-qTIVwaGN.js file to check for resetTriggered before sending the verbose notice:

// agent-runner.runtime-qTIVwaGN.js:2305
if (verboseEnabled && activeIsNewSession && !resetTriggered) {
  // Send verbose notice
  sendVerboseNotice(`🧭 New session: ${sessionId}`);
}

Additionally, we should review the pi-embedded-CbCYZxIb.js file to ensure that sendResetSessionNotice is only called when necessary:

// pi-embedded-CbCYZxIb.js:92452
if (resetTriggered && isAuthorizedSender) {
  // Send reset session notice
  sendResetSessionNotice(`✅ New session started · model: ${model}`);
}

Verification

To verify the fix, enable verbose mode and run the /new command. Only one "new session" notification should be received.

Extra Tips

  • Review the notification logic to ensure that it aligns with the expected behavior.
  • Consider adding logging to track when notifications are sent to help with debugging.

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