Bug Description
When a heartbeat poll creates an isolated session, it can receive async exec completion notifications from a different base session. The isolated session lacks the agent's SOUL.md persona, causing it to respond in English with a generic "I don't see any system messages" reply. This reply is then delivered to the origin chat (e.g. a group chat), confusing users.
Reproduction Steps
- Have an active agent with SOUL.md persona configured
- Trigger a heartbeat poll while another session has a pending/executing async command
- The heartbeat creates an isolated session
- The failed/pending exec completion notification from the other session gets forwarded to the heartbeat isolated session
- The heartbeat isolated session (without SOUL.md persona) responds in English
- The English reply gets delivered to the group chat
Expected Behavior
- Heartbeat isolated sessions should either:
- Not receive exec completion notifications from other sessions, OR
- Include SOUL.md/persona context so replies match the agent's configured personality
- Silently handle async notifications without generating visible replies
Actual Behavior
- Heartbeat isolated session receives the notification, has no persona context, replies in English
- Reply is routed to the origin group chat
Environment
- OpenClaw version: latest (installed via homebrew)
- OS: macOS (arm64)
- Model: various (glm-4.7 in the isolated session)
Key Observations
- The
heartbeatIsolatedBaseSessionKey in the session metadata points to the correct base session
- The
origin field in the session metadata points to the group chat, which is why the reply gets delivered there
- The exec that triggered the notification was terminated with
SIGTERM (model timeout), so there was no actual output to relay
- The notification template says "An async command you ran earlier has completed. The result is shown in the system messages above." but no system message with the result exists in the isolated session's context
Suggested Fix
- Don't relay exec notifications to heartbeat isolated sessions - they should only handle the heartbeat poll
- Or: include persona/system prompt in heartbeat isolated sessions so replies match the agent's personality
- Or: detect when an isolated session has no prior context and suppress auto-replies to system notifications
Bug Description
When a heartbeat poll creates an isolated session, it can receive async exec completion notifications from a different base session. The isolated session lacks the agent's SOUL.md persona, causing it to respond in English with a generic "I don't see any system messages" reply. This reply is then delivered to the origin chat (e.g. a group chat), confusing users.
Reproduction Steps
Expected Behavior
Actual Behavior
Environment
Key Observations
heartbeatIsolatedBaseSessionKeyin the session metadata points to the correct base sessionoriginfield in the session metadata points to the group chat, which is why the reply gets delivered thereSIGTERM(model timeout), so there was no actual output to relaySuggested Fix