Repository navigation
fix: use isActive instead of isStreaming for steer mode message injection - #52351
scottyallen wants to merge 3 commits into
Conversation
…aths (op-na9) Conflict-resolved rebase of polecat/slit/fix-heartbeat-slack onto main. Original src/slack/monitor/replies.ts and src/channels/plugins/outbound/slack.ts have moved to extensions/slack/src/monitor/replies.ts and extensions/slack/src/outbound-adapter.ts; changes applied to new locations. Test file adapted to extension test conventions.
…tion Fixes steer mode messages not being injected because the code gates on isStreaming (which is false when the stream hasn't started yet) instead of isActive (which correctly reflects whether the session is running). Also removes the isStreaming guard from queueEmbeddedPiMessage in runs.ts for the same reason - the function should accept queued messages whenever the run is active, not only when it is already streaming. Fixes openclaw#48003
Add tests covering: - queueEmbeddedPiMessage: no active run, active but not streaming (original bug case), active but compacting, active and streaming - Steer guard in runReplyAgent: shouldSteer+isActive injects message, shouldSteer+!isActive skips injection, !shouldSteer skips injection These tests verify the fix that changed the steer guard from isStreaming to isActive (issue openclaw#48003 / PR openclaw#52351).
Add tests covering: - queueEmbeddedPiMessage: no active run, active but not streaming (original bug case), active but compacting, active and streaming - Steer guard in runReplyAgent: shouldSteer+isActive injects message, shouldSteer+!isActive skips injection, !shouldSteer skips injection These tests verify the fix that changed the steer guard from isStreaming to isActive (issue openclaw#48003 / PR openclaw#52351).
46f5879 to
7057b6c
Compare
Add tests covering: - queueEmbeddedPiMessage: no active run, active but not streaming (original bug case), active but compacting, active and streaming - Steer guard in runReplyAgent: shouldSteer+isActive injects message, shouldSteer+!isActive skips injection, !shouldSteer skips injection These tests verify the fix that changed the steer guard from isStreaming to isActive (issue openclaw#48003 / PR openclaw#52351).
|
Closing this as duplicate or superseded after Codex automated review. Close PR #52351 as superseded by #65010. Current main still has the Best possible solution: Close #52351 as superseded and continue review on #65010 as the canonical implementation for the steer/interrupt queue lifecycle fix. The final landed change should cover What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 76cf013df507. |
…nclaw#52351 openclaw#73365) Add isStopped() to EmbeddedPiQueueHandle so messages can be queued during tool-call phases (active but not streaming). The steer gate in agent-runner now checks isActive instead of isStreaming.
Summary
sessions_sendor similar) are silently dropped when injected into a running agent session. Users send a steer message expecting it to be injected into the agent's conversation, but nothing happens.isStreaming(whether the LLM response stream has started) instead ofisActive(whether the agent session is running). When a session is active but the stream has not started yet,isStreamingis false and steer messages are rejected.isActivecorrectly reflects whether the session can accept injected messages.agent-runner.tsline 196: changed the steer condition fromshouldSteer && isStreamingtoshouldSteer && isActive. (2)runs.tsqueueEmbeddedPiMessage: removed theisStreaming()early-return guard so messages can be queued whenever the run is active and not compacting.isStreamingproperty itself, no changes to theEmbeddedPiQueueHandleinterface, no changes to compaction guards or abort logic.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Steer mode messages are no longer silently dropped when the agent session is active but not yet streaming. Users will see their steer messages injected into the agent conversation as expected.
Security Impact (required)
Repro + Verification
Environment
Steps
Expected
Steer message is injected into the running agent session.
Actual (before fix)
Steer message is silently dropped.
queueEmbeddedPiMessagereturns false with diagnostic logreason=not_streaming.Evidence
isStreamingis false when a session is active but stream has not started;isActivecorrectly reflects the session statepnpm checkpasses (all lint, format, type checks green)not_streamingrejectionHuman Verification (required)
isActiveis in scope and semantically correct for the steer guardqueueEmbeddedPiMessage- messages are still rejected during compaction. Theno_active_runguard remains as well.Review Conversations
Compatibility / Migration
Failure Recovery (if this breaks)
src/auto-reply/reply/agent-runner.ts,src/agents/pi-embedded-runner/runs.tsRisks and Mitigations
isStreamingguard fromqueueEmbeddedPiMessagecould allow messages to be queued before the stream infrastructure is ready to process them.queueMessagehandle is only registered inACTIVE_EMBEDDED_RUNSafter the run is fully initialized, so the handle existing implies the infrastructure is ready. The compaction guard remains as an additional safety check.AI-Assisted PR
pnpm checkpasses (lint, format, types), full test suite not runcodexCLI not available in this environment; noted for reviewer awareness