fix: suppress SUBAGENT_SPAWN_ACCEPTED_NOTE for cron isolated sessions#27470
Merged
obviyus merged 2 commits intoopenclaw:mainfrom Feb 26, 2026
Merged
fix: suppress SUBAGENT_SPAWN_ACCEPTED_NOTE for cron isolated sessions#27470obviyus merged 2 commits intoopenclaw:mainfrom
obviyus merged 2 commits intoopenclaw:mainfrom
Conversation
fe1d705 to
4fff8eb
Compare
Contributor
Greptile SummaryFixed cron isolated session subagent spawning by correctly detecting cron sessions via
Confidence Score: 5/5
Last reviewed commit: 4fff8eb |
This comment was marked as spam.
This comment was marked as spam.
The 'do not poll/sleep' note added to sessions_spawn tool results causes
cron isolated agents to immediately end their turn, since the note tells
them not to wait for subagent results. In cron isolated sessions, the
agent turn IS the entire run, so ending early means subagent results
are never collected.
Fix: detect cron sessions via includes(':cron:') in agentSessionKey
and suppress the note, allowing the agent to poll/wait naturally.
Note: PR openclaw#27330 used startsWith('cron:') which never matches because
the session key format is 'agent:main:cron:...' (starts with 'agent:').
Fixes openclaw#27308
Fixes openclaw#25069
e76759d to
f950abd
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #27308
Fixes #25069
Problem
The
SUBAGENT_SPAWN_ACCEPTED_NOTE("do not poll/sleep") causes cron isolated agents to immediately end their turn, because the note tells them not to wait for subagent results. In cron isolated sessions, the agent turn IS the entire run — ending early means subagent results are never collected.Root Cause
PR #27330 attempted to fix this but used
startsWith("cron:")which never matches becauseagentSessionKeyformat isagent:main:cron:...(starts with"agent:").Fix
Detect cron sessions via
includes(":cron:")inagentSessionKeyand suppress the note, allowing the agent to poll/wait for subagent results naturally.Tests
Added
openclaw-tools.subagents.sessions-spawn.cron-note.test.tswith 4 tests::cron:in session key (not justagent:main:...)agentSessionKeyis undefinedVerified
Tested locally on v2026.2.25 (commit
c5d040bbe):startsWith("cron:")(PR #27330)includes(":cron:")(this PR)