Repository navigation
Restore Telegram /steer for active Codex runs - #98126
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@openclaw-mantis telegram live proof: verify /steer and /tell bypass a busy Telegram Codex run and reach the active Codex turn via turn/steer instead of becoming a delayed follow-up. |
|
Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 1:16 PM ET / 17:16 UTC. Summary PR surface: Source +107, Tests +320. Total +427 across 15 files. Reproducibility: yes. source-level: current main lacks the Telegram control-lane aliases, sibling/session-file active-run lookup, Codex session-file registration, and active non-streaming admission needed for the reported command-steering path; no live Telegram repro was run in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land only after redacted current-head Telegram proof shows Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main lacks the Telegram control-lane aliases, sibling/session-file active-run lookup, Codex session-file registration, and active non-streaming admission needed for the reported command-steering path; no live Telegram repro was run in this read-only review. Is this the best way to solve the issue? Mostly yes: the PR touches the implicated Telegram lane, steer resolver, Codex registration, and steer-mode admission points without expanding the public plugin SDK, but it is not merge-ready until current-head Telegram proof verifies the visible behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4895a00b94f0. Label changesLabel justifications:
Evidence reviewedPR surface: Source +107, Tests +320. Total +427 across 15 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review Current head is Current-head CI is clean: Remaining proof boundary: live Telegram proof is still needed before merge. The maintainer-authorized Mantis Telegram run I can see is |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Follow-up for the steer-mode vs follow-up queue gap flagged after the initial PR:
Focused validation on the new head: Boundary kept explicit: this still does not implement a blind bypass for ordinary Telegram text messages before OpenClaw resolves the final session/thread/queue-mode context. The PR now fixes explicit |
|
@openclaw-mantis telegram live proof: verify /steer and /tell bypass a busy Telegram Codex run and reach the active Codex turn via turn/steer instead of becoming a delayed follow-up on current head 8989f8461f2e516c6749e2acc7efe53877201a3a. |
|
@openclaw-mantis telegram live proof: verify /steer and /tell bypass a busy Telegram Codex run and reach the active Codex turn via turn/steer instead of becoming a delayed follow-up. |
|
@clawsweeper re-review Current head is Current local proof for the new head: Current remote CI is still running but has no failing jobs at this point. The remaining proof blocker is live Telegram proof: Mantis workflow requests from |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs for /steer during an active Telegram run; this PR did not show the expected steer acknowledgement.
Motion-trimmed clips: |
|
Maintainer proof request for current head. The Mantis result at https://github.com/openclaw/openclaw/actions/runs/28441543238 is useful stale evidence, but it is not merge-clearing proof for the current PR head:
Current PR state I rechecked:
I cannot trigger this proof from Could a maintainer with write access please post exactly: Once current-head proof is attached, I will update the PR evidence and request |
|
Small clarification on the ClawSweeper stored-data note: The durable review currently says Current changed-file list is limited to Telegram sequential-key routing/tests, Codex app-server active-run registration/tests, embedded/reply active-run state, and steer command/runtime tests: The boundary checks that would catch package/API/schema-style drift are green on the current head. I’m treating current-head live Telegram proof as the remaining merge blocker, not a persistence migration requirement. |
8989f84 to
896693e
Compare
896693e to
6912ef4
Compare
|
Landed via rebase onto main.
Thanks @100yenadmin! |




Summary
/steer,/tell, and/queuetext commands through the Telegram control lane so active-run management does not wait behind the busy chat/topic lane./steeractive-run lookup to recover from slash-lane targeting by checking the active session key, session file, sibling direct/DM lanes, and then the legacy stored session id fallback.sessionFile, matching the generic embedded runner so channel command lookup can find active Codex turns and deliver through existingturn/steer.messages.queue.mode: "steer"admission for active non-streaming runs by using active/not-stopped handles instead of stream-only checks.Fixes #81594.
Refs #48003.
Refs #82479.
Supersedes #81592 and #81613.
What Problem This Solves
Users sending
/steeror/tellfrom Telegram during an active Codex run can currently see the command arrive too late or get treated as a separate prompt. That makes channel-native steering unreliable exactly when a user is trying to correct a long-running Codex turn without terminal access.There is also a related steer-mode failure: when
messages.queue.modeis set tosteer, active runs that are no longer streaming but are still accepting input could be rejected asnot_streaming, causing the message to fall through to queued follow-up behavior instead of steering the active run.Root Cause
Telegram
/steertext commands had two independent ways to miss an active Codex turn:/steer,/tell, or/queueas control-lane commands, so they could wait behind the same long-running chat/topic lane they were meant to control./steeractive-run resolution stopped after the selected session key and stored session id. If the selected key was a slash lane, or if the active Codex run was only recoverable from the transcript session file, the command fell through as a new prompt instead of steering the active turn.Codex app-server already supports steering with
turn/steer; the missing piece was registering the active run with the samesessionFilelookup used by the generic embedded runner.For steer mode, the shared runtime admission gate used
isStreaming()as a proxy for whether a run could accept steering. That was too narrow. Active non-streaming prompt phases can still accept queued steering, so the queue handles now expose optionalisStopped()state. Legacy handles keep the old stream-only behavior; updated embedded/Codex/reply handles accept steering while active and not stopped, and fail closed if stopped-state checks throw.Flow
Scope
This restores the Telegram command path for active Codex runs and fixes shared runtime steer-mode admission for active non-streaming runs once a message reaches reply handling.
This intentionally does not claim to fix every #48003 case. Ordinary Telegram text messages are still serialized by
botRuntime.sequentialize(getTelegramSequentialKey)before OpenClaw resolves the finalSessionKey, thread binding, and queue mode. A safe ordinary-message steer-mode bypass needs a post-context, active-session-aware ingress design so we do not route first turns or cross-topic messages to the wrong active run.Evidence
/steer,/tell,/queue, and targeted command forms./steerresolver tests failed for session-file lookup and slash-lane direct sibling fallback.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run extensions/telegram/src/sequential-key.test.ts src/auto-reply/reply/commands-steer.test.ts extensions/codex/src/app-server/run-attempt.steering.test.ts --reporter=verboseOPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run src/auto-reply/reply/agent-runner.media-paths.test.ts src/agents/embedded-agent-runner/runs.test.ts src/auto-reply/reply/reply-run-registry.test.ts --reporter=verbosegit diff --check./node_modules/.bin/oxlinton touched files../node_modules/.bin/oxfmt --check --threads=1on touched files.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.extensions.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-test.tsbuildinfocurrently fails on unrelatedextensions/qa-labcrabline type errors. The new Codex steering test type error found during development was fixed and did not recur.detect_changesreports medium risk, with affected processes limited to Telegram dispatch/sequential-key flow and shared active-run steering admission.Proof Request
After CI starts, please run Telegram visible proof for this PR: