-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Silent ~48s post-embedded run done lane retention on Discord turns (2026.5.20) — no trace-level emit in the gap #85822
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Bug type
Performance / latency
Summary
User-initiated Discord DM turns on
2026.5.20consistently take ~50–65 s end-to-end, but only ~3–15 s of that is the actual LLM call. The remaining ~48 s is a silent gap betweenembedded run doneandlane task donein which the gateway emits zero log entries even atOPENCLAW_LOG_LEVEL=tracebeyond a periodic heartbeat. The session lane completes on its own (nolane wait exceeded, nostuck sessionwarning), but the reply is held for ~48 s before delivery.The behavior is reproducible on every Discord DM turn, regardless of message length, model latency, or TTS configuration.
Environment
2026.5.20v24.14.04.4.302+(cgroup v1), 4 CPUs, 64 GB RAM, no container CPU/memory limitnode dist/index.js gateway --bind lan --port 18789 --verboseOPENCLAW_LOG_LEVEL=trace(set for diagnostic capture)OPENCLAW_CODEX_APP_SERVER_SANDBOX=danger-full-accessopenai/gpt-5.5via codex-app-server (OAuth)Observed timeline (typical turn —
TIMING_TEST_69)End-to-end: 65.9 s. Embedded LLM: 9.5 s. Silent post-LLM gap: ~48 s.
What we ruled out
messages.tts.auto=off, gateway restarted, behavior unchanged. Same ~48 s gap. (messages.tts.providers.elevenlabsplugin still loaded; the silence isn't TTS-bound.)durationMsfromembedded run doneranges 3.3–15 s across three test turns. All within normal gpt-5.5 latency.attempt-dispatch totalMs=574. Thestream-readyphase prep that [Bug]: 2026.4.29 embedded agent reply latency ~40-47s before stream-ready; packaged channel deps missing #75650 talks about does not appear in our traces; we're on the post-2026.4.29 codepath.stuck sessionwatchdog does not fire (lane completes within its threshold). Nolane wait exceededeither.Three additional observations
shouldWarnEmbeddedRunStageSummarythresholds never trigger. The bundled code (dist/selection-BmjEdnnA.js) defines:Our 48-65 s totals should warn 5× over, yet no
[trace:embedded-run] prep stageswarning is ever emitted at any log level. EitheremitPrepStageSummaryis never invoked on the user-turn code path, orshouldWarnis computed against a different time window (per-stage rather than total elapsed).OPENCLAW_CODEX_APP_SERVER_SANDBOX=danger-full-accessdoes not suppress the bubblewrap probe. Every turn the codex app-server emits:…twice per turn (separated by ~7 s). The env var is honored (codex runs without sandbox), but the underlying check that produces the stderr message isn't gated by it.
liveness warning: event_loop_delay eventLoopDelayMaxMs=2246fires inside the embedded-run window. The Node event loop is being blocked for ~2.2 s by something synchronous. This is concerning independent of the post-LLM gap.Repro
In any clean
2026.5.20install with Discord enabled andOPENCLAW_LOG_LEVEL=trace:hi).grep -E "discord: inbound|embedded run done|lane task done|discord: delivered" /tmp/openclaw/openclaw-<date>.logfor the turn.Expected:
lane task done durationMs≈embedded run done durationMs+ a few hundred ms.Actual:
lane task done durationMs≈embedded run done durationMs+ ~45–55 s with no intervening log activity.Related (but distinct)
sessions.jsonsurgery. Same lane subsystem, but their lane never recovers without intervention; ours completes after ~48 s.bootstrap-contextstage variance causing 20-37 s heartbeat fires on 5.20. Different phase (stream-readyprep), different trigger (heartbeats, not user turns). Possibly same root cause in the embedded runner — both surface as silent variable delay on 5.20.phase=stream-readypath; the symptom has now apparently relocated to a post-embedded run donephase that has no equivalent trace instrumentation.What would help
embedded run donelane pipeline. Whatever is happening betweenembedded run doneandlane task doneis fully silent — even attrace, even with--verbose. The user/operator has no insight into the 48 s.EMBEDDED_RUN_STAGE_WARN_TOTAL_MS=10000is meaningless if our 60 s+ totals don't trigger it. Either the snapshot isn't taken on this path or the comparison is against the wrong field.OPENCLAW_CODEX_APP_SERVER_SANDBOX=danger-full-access(or equivalently document why it must continue to emit).