Skip to content

fix(agents): reconcile interrupted subagents at startup - #166846

Merged
steipete merged 2 commits into
mainfrom
codex/stab-subagent-restart-recovery
Oct 8, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/stab-subagent-restart-recovery

Conversation

@steipete

@steipete steipete commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

When the Gateway restarts while a parent session is waiting on subagents, the interrupted children are only reconciled by the subagent registry's periodic sweep, not at startup. The parent therefore waits for that maintenance pass before it learns its children were interrupted and can finish the task. In a stability-campaign crash test on main (parent launches two 20-second shell subagents, Gateway SIGKILLed while both run, then restarted), children were next active 46 s after the restarted Gateway became healthy, and the parent's final answer arrived at 93 s.

User Impact

  • After a crash or restart, parents learn about interrupted children right after startup instead of on the next maintenance tick. In the same crash test the children resumed at 27 s and the parent answered at 61 s, about a third faster end-to-end.
  • A follow-up to an interrupted native child now says the missing or aborted tool output is an unknown outcome caused by the restart, so the child verifies effects before repeating an action instead of reporting "tool failed".
  • Unchanged: interrupted children still settle through their normal completion path and are not relaunched automatically, the parent owns finishing the task, and recovery still pauses while the crash-loop breaker (fix(gateway): pause restart recovery while the crash-loop breaker is tripped #166238) is tripped.

Why This Change Was Made

Registry activation already restored requester ownership but left interrupted runs to periodic maintenance. Activation now runs one interruption-only pass through the existing guarded recovery coordinator right after ownership is restored (subagent-registry-restore.ts). The coordinator is the single owner of the eligibility check, which moved out of the sweeper, so the startup pass and periodic sweeps share one gate. It respects the crash-loop pause and rechecks ownership after awaiting preparation. The periodic sweep remains the retry backstop. The restart-recovery note lives in one shared module (restart-recovery-prompt.ts), reused by main-session recovery and by sessions_send follow-ups to interrupted native children. It is distinct from the recovered-child failure diagnostics main already preserves (#166454). Prompt snapshot token delta is 0.

Evidence

Live crash test (dev Gateways from main 905a74d and this head, fresh state, real OpenAI provider; parent spawns two sleep 20; echo … subagents, SIGKILL while both run, restart; times from the restarted Gateway becoming healthy):

                 children active again   parent final (A=alpha B=beta)
main 905a74d1    45.7 s                  92.7 s
this head        27.5 s                  61.3 s

Tests: 1,370 passed across 52 non-E2E files covering recovery, lifecycle, announce, requester wakes, raw owners, collectors, cancellation, persistence, and prompts (restart/announce/prompt set 506 s; remaining registry set 590 s). With production rolled back, the four startup regressions, both prompt regressions, and the breaker-pause regression fail. A deterministic FIFO fixture deadlock exposed during the rebase was repaired by removing a redundant admission suspension; capacity-ordering assertions are intact. Types, lint, format, and the import-cycle check pass. Autoreview is clean through P2.

Production +52/-18, tests/support +205/-20, docs +6/-1 (docs/gateway/restart-recovery.md).

Landing validation: initial CI run 37708125808 found a missing GatewayRecoveryRuntime type import in the updated sweeper fixture. Commit d9798f6746312606c0736ecc555c6cdad0036450 restores that import; the agent/session test typecheck now passes locally. The original head passed 119 focused startup/ownership/prompt tests across three files (204.10 s wall), and the repaired fixture passed all 33 sweeper recovery tests (48.11 s wall). Independent review found no actionable P0–P2 findings in the original change or the one-line repair. CI and ClawSweeper are being checked against the repaired head before landing.

Settle restored interruptions after requester ownership transfer through the existing recovery coordinator and sweep overlap guard. Respect the Gateway crash-loop recovery pause and retry through scheduled maintenance, preserving owner checks after preparation.

Share restart outcome guidance between main-session recovery and retained native-child follow-ups without duplicating failure diagnostics. Preserve parent delivery retries across lifecycle consolidation and use the active collector capacity fence in the restored FIFO fixture.
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M labels Oct 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 9:03 PM ET / October 8, 2026, 01:03 UTC (Revision 2).

ClawSweeper review

What this changes

The branch reconciles interrupted subagents during Gateway startup and gives native-child continuations shared guidance to verify uncertain tool outcomes.

Example: The Gateway restarts while two shell subagents run

  • Before: In the recorded main crash test, the parent returns A=alpha B=beta after 92.7 seconds.
  • After: In the recorded branch crash test, the parent returns A=alpha B=beta after 61.3 seconds.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-preserving repair with real-Gateway before/after proof, meaningful regression coverage, and no remaining findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The recorded real-provider Gateway crash/restart flow exercises restored child settlement and parent continuation, with the parent final improving from 92.7 to 61.3 seconds. The latest commit changes only a fixture type import. The patch changes no stored schema or serialized shape, so no migration is required.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: After a Gateway restart, parents wait for maintenance before learning that their child work was interrupted.
Reason: The change improves an established restart-continuation flow with a small production adjustment and measured real-Gateway benefit. Prior area history establishes owner direction, and existing continuation policy is preserved.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main still waits for scheduled interruption reconciliation. The repaired head has sufficient real-Gateway proof, preserves recovery ownership, and has no actionable review findings.

Priority: P2
Reviewed head: d9798f6746312606c0736ecc555c6cdad0036450

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway’s subagent registry restores saved child runs and informs their parent sessions when execution was interrupted. Parents then decide whether to continue retained children or assign replacement work.

flowchart TD
  A[Gateway restart] --> B[Restore saved child runs]
  B --> C[Restore requester ownership]
  C --> D[Shared recovery coordinator]
  D --> E{Recovery paused or owner changed?}
  E -->|Yes| F[Scheduled retry]
  E -->|No| G[Settle interruption and inform parent]
  G --> H[Parent reconciles unfinished work]
  F --> D
Loading

Technical review

Best possible solution:

Keep startup and periodic reconciliation under the existing recovery coordinator, with parents controlling child continuation and uncertain effects verified before retry.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main activation lacks the interruption pass, and the supplied real-provider SIGKILL/restart scenario demonstrates the resulting delay. This read-only review did not execute it.

Is this the best way to solve the issue?

Yes: invoking the existing guarded coordinator after requester restoration is a narrow repair, and sharing the interruption guidance avoids competing prompt behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5ffec9b0ad85.

Provenance checked

Testing

Proof path: shipped entry point. Added test files: 11.

Security

None.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Source +34, Tests +186, Docs +7. Total +227 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 7 52 18 +34
Tests 12 205 19 +186
Docs 1 8 1 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 265 38 +227

Review metrics

Metric Value Why it matters
Observed parent recovery latency 92.7 s → 61.3 s in one paired crash scenario The recorded real-provider flow demonstrates a concrete user benefit without establishing a general latency guarantee.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded restart-recovery improvement with demonstrated delay reduction and preserved existing recovery policy.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T00:34:18.146Z sha 02b39db :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 8, 2026
@steipete
steipete merged commit 89b6b48 into main Oct 8, 2026
135 checks passed
@steipete
steipete deleted the codex/stab-subagent-restart-recovery branch October 8, 2026 01:11
@steipete

steipete commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
)

* fix(agents): reconcile interrupted subagents at startup

Settle restored interruptions after requester ownership transfer through the existing recovery coordinator and sweep overlap guard. Respect the Gateway crash-loop recovery pause and retry through scheduled maintenance, preserving owner checks after preparation.

Share restart outcome guidance between main-session recovery and retained native-child follow-ups without duplicating failure diagnostics. Preserve parent delivery retries across lifecycle consolidation and use the active collector capacity fence in the restored FIFO fixture.

* fix(agents): restore recovery runtime fixture type import
steipete added a commit that referenced this pull request Oct 9, 2026
Startup interruption recovery can return while detached cleanup still owns
the retired receipt. A microtask yield lets the test's explicit sweep race
that cleanup and report a correctly rejected stale recovery write.

Await the existing fixture settlement barrier before both sweeps. Preserve
all cases and assertions, including the newer session restart marker and
retired receipt removal. No production behavior changes.

Follow-up to #166846.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
Startup interruption recovery can return while detached cleanup still owns
the retired receipt. A microtask yield lets the test's explicit sweep race
that cleanup and report a correctly rejected stale recovery write.

Await the existing fixture settlement barrier before both sweeps. Preserve
all cases and assertions, including the newer session restart marker and
retired receipt removal. No production behavior changes.

Follow-up to openclaw#166846.
steipete added a commit that referenced this pull request Oct 12, 2026
The restart matrix starts a manual sweep while activation can still be settling interrupted subagents. Join the existing fixture settlement barrier before the sweep; preserve every assertion and all production guards. Test-only: one line added.

Startup recovery introduced by 89b6b48 (#166846) supplies the overlapping work; 70637ed repaired two sibling cases but missed this matrix. This is source-supported attribution, not a bisected first-bad commit.

Validation: the exact changed file passed 33/33 in CI runs 38275924955 and 38279325004. The focused local file passed 33/33 on composition b3c4dcb (1202.38s Vitest / 1343.45s wrapper), with a clean final checkout and no owned survivors. Codex scoped review found no actionable issue. V9 build, types, lint, dependencies, topology, contracts and baseline ratchets passed; its SDK API-report job timed out. These are composition-level results, not whole-head certification of this single commit.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
The restart matrix starts a manual sweep while activation can still be settling interrupted subagents. Join the existing fixture settlement barrier before the sweep; preserve every assertion and all production guards. Test-only: one line added.

Startup recovery introduced by 6fdb7d2 (openclaw#166846) supplies the overlapping work; 1ef9fbf repaired two sibling cases but missed this matrix. This is source-supported attribution, not a bisected first-bad commit.

Validation: the exact changed file passed 33/33 in CI runs 38275924955 and 38279325004. The focused local file passed 33/33 on composition b3c4dcb (1202.38s Vitest / 1343.45s wrapper), with a clean final checkout and no owned survivors. Codex scoped review found no actionable issue. V9 build, types, lint, dependencies, topology, contracts and baseline ratchets passed; its SDK API-report job timed out. These are composition-level results, not whole-head certification of this single commit.
RomneyDa added a commit that referenced this pull request Oct 17, 2026
The native subagent restart live proof SIGKILLs the Gateway three times in
about two minutes. The third unclean boot trips the documented restart-loop
breaker (3 unclean boots within 5 minutes, #166238), which pauses restart
settlement, including interrupted subagent recovery (#166846), until the
unclean window drains. The orphan assertion added with the #169144 backport
only waited 30 seconds, so the nonannouncing child was still `running`.

Wait up to 360 seconds for the orphan settlement so the proof covers the
breaker pause and the automatic resume after its window. Assertions are
unchanged. 2026.10.4 passed because it predates the breaker pause, startup
subagent reconciliation, and this assertion.

Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an
exec-blocked child passes with one prior kill; with two warm-up kills it logs
"restart-loop breaker tripped" and the parent continuation never arrives
within 60 seconds; with a 400-second wait it settles and passes (338s).
RomneyDa added a commit that referenced this pull request Oct 20, 2026
The native subagent restart live proof SIGKILLs the Gateway three times in
about two minutes. The third unclean boot trips the documented restart-loop
breaker (3 unclean boots within 5 minutes, #166238), which pauses restart
settlement, including interrupted subagent recovery (#166846), until the
unclean window drains. The orphan assertion added with the #169144 backport
only waited 30 seconds, so the nonannouncing child was still `running`.

Wait up to 360 seconds for the orphan settlement so the proof covers the
breaker pause and the automatic resume after its window. Assertions are
unchanged. 2026.10.4 passed because it predates the breaker pause, startup
subagent reconciliation, and this assertion.

Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an
exec-blocked child passes with one prior kill; with two warm-up kills it logs
"restart-loop breaker tripped" and the parent continuation never arrives
within 60 seconds; with a 400-second wait it settles and passes (338s).

(cherry picked from commit 1a4c2a0)
RomneyDa added a commit that referenced this pull request Oct 20, 2026
…7319)

* fix(test): treat the env-gated Agents API live proof as optional shard evidence

test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case
unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard
never sets, so the shard's no-passing-assertions guard failed it on every
2026.10.5 candidate once the other harness tests went green. Register it in
the existing whole-file opt-in map like the other env-gated live proofs.

(cherry picked from commit 761ef64)

* fix(test): decode the Codex CLI JSON error after plugin uninstall

The live Codex npm plugin lane matched the expected post-uninstall error
against raw --json stdout, where quotes are escaped, so the correct
owner-plugin-not-activatable error never matched. Decode the canonical CLI
error message first, as the 2026.10.4 release line does (a9fd56d).

(cherry picked from commit e8772a9)

* fix(test): scope CLI announcement barrier to parent probe

(cherry picked from commit d5c0db7)
(cherry picked from commit a48d4a8)

* test(live): wait out the crash-loop breaker before the orphan settles

The native subagent restart live proof SIGKILLs the Gateway three times in
about two minutes. The third unclean boot trips the documented restart-loop
breaker (3 unclean boots within 5 minutes, #166238), which pauses restart
settlement, including interrupted subagent recovery (#166846), until the
unclean window drains. The orphan assertion added with the #169144 backport
only waited 30 seconds, so the nonannouncing child was still `running`.

Wait up to 360 seconds for the orphan settlement so the proof covers the
breaker pause and the automatic resume after its window. Assertions are
unchanged. 2026.10.4 passed because it predates the breaker pause, startup
subagent reconciliation, and this assertion.

Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an
exec-blocked child passes with one prior kill; with two warm-up kills it logs
"restart-loop breaker tripped" and the parent continuation never arrives
within 60 seconds; with a 400-second wait it settles and passes (338s).

(cherry picked from commit 1a4c2a0)

* test(qa-lab): skip user-role runtime carriers in visible-child send proof

The sessions_send visible-child proof timed out on every 2026.10.5
candidate: its synthetic provider picked the latest user item that lacked
the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt.

Since #168546 (backport 8d66b94), OpenAI-compatible Responses
endpoints, including mock-openai, keep runtime context in a user-role
"OpenClaw runtime context:" carrier after the user turn instead of a
developer message. The fixture then read that carrier as the prompt, never
saw the "send" prompt on turn 2, answered PARENT_READY again, and the test
waited for PARENT_DONE until timeout.

Captured provider requests: v2026.10.4 sends the turn-2 carrier with role
developer; the 10.5 tip sends it with role user. Reverting a293f2e
(#168410) left the failure unchanged.

Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText
helper, which already accepts current and legacy carrier shapes.

(cherry picked from commit d3a06e7)

* test(buzz): skip real reconnect backoff in cold-start recovery

(cherry picked from commit fa2049a)

* fix(release): let the Telegram release lane finish its 25 scenarios

The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25
on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged
Gateway start). main carries the same Telegram scenario set and job, so
raise the job budget to 90 minutes; the calling release-checks job keeps its
210-minute bound.

Also carry the 2026.10.4 release-line fixture fix for
telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in
the shared Gateway workspace and create it up front so the isolated SUT can
append without EACCES. main still writes it under the private tempRoot.

(cherry picked from commit 3cb49f0, adapted to main's runner anchor)

* test(gateway): probe startup readiness on fresh connections

The deferred-fleet startup test failed twice in 2026.10.5 FRV #12 with
`fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's
event loop. A /healthz or /readyz probe could reuse a keep-alive socket
that Undici still treated as live; when the request was written and a
synchronous main-thread startup stall followed, the server's idle-timer
callback ran before the poll phase read the request and destroyed the
socket with the request unread, so the kernel reset the connection.

main still probes with default keep-alive fetches. Probe with
`Connection: close`, matching existing Gateway test probes. Assertions are
unchanged.

(cherry picked from commit e3c63f2, adapted to main's probe sites)

* test(live): expect review effort for Skill Workshop background reviews in the Ultra lane

Since #161057 the Skill Workshop counts iterations per session, so Ultra probe
sessions trigger a background review after idling. The review runs under its
own skill-workshop-review: run and does not inherit the session's thinking
level, so the lane's every-request-is-max assertion failed on 2026.10.5
whenever a review reached the provider.

On main, #173889 pins review runs to thinkLevel "low" (review-run.ts), which
the OpenAI stream wrapper sends as effort "low". Expect that effort for review
runs; Ultra runs and their sessions must still be max, and independent
heartbeats stay medium.

The live file is over the line cap, so the Ultra wire effort policy moves to
a sibling helper with its observation type, and the deterministic review
cases run in the normal helper suite.

(cherry picked from commit ca15213, adapted to main's review thinking level)

* test(release): forward-port 2026.10.4-line upgrade-survivor and runtime-smoke harness fixes

Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never
received:

- cron-scheduled-authority: seed the cron authority specimen through the
  published baseline's own SQLite writer (seedPublishedCronJobs) instead of a
  raw cron/jobs.json that current candidates treat as a retired pre-July
  store; drop owner fields for pre-2026.7.1 baselines
  (usesCronOwnerAtBaseline). The dispatcher passes the package root to
  seedState, and the scenario now requires a published baseline.
- bundled plugin runtime smoke: join deferred read-only update discovery via
  update.status before the package-manager child watchdog. main still defers
  install discovery (`<manager> root -g`) until after ready, so it can race
  the watchdog's no-package-manager-children check.

Skips the codex npm plugin live source-reply grep from the release commit:
main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts.

(cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed
test adapted to main's executable-mode fixture writes)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…nclaw#177319)

* fix(test): treat the env-gated Agents API live proof as optional shard evidence

test/gateway-agentsapi.live.test.ts (new since 2026.10.4) skips its only case
unless OPENCLAW_LIVE_AGENTS_API=1, which the native live test-harness shard
never sets, so the shard's no-passing-assertions guard failed it on every
2026.10.5 candidate once the other harness tests went green. Register it in
the existing whole-file opt-in map like the other env-gated live proofs.

(cherry picked from commit 761ef64)

* fix(test): decode the Codex CLI JSON error after plugin uninstall

The live Codex npm plugin lane matched the expected post-uninstall error
against raw --json stdout, where quotes are escaped, so the correct
owner-plugin-not-activatable error never matched. Decode the canonical CLI
error message first, as the 2026.10.4 release line does (a9fd56d).

(cherry picked from commit e8772a9)

* fix(test): scope CLI announcement barrier to parent probe

(cherry picked from commit d5c0db7)
(cherry picked from commit a48d4a8)

* test(live): wait out the crash-loop breaker before the orphan settles

The native subagent restart live proof SIGKILLs the Gateway three times in
about two minutes. The third unclean boot trips the documented restart-loop
breaker (3 unclean boots within 5 minutes, openclaw#166238), which pauses restart
settlement, including interrupted subagent recovery (openclaw#166846), until the
unclean window drains. The orphan assertion added with the openclaw#169144 backport
only waited 30 seconds, so the nonannouncing child was still `running`.

Wait up to 360 seconds for the orphan settlement so the proof covers the
breaker pause and the automatic resume after its window. Assertions are
unchanged. 2026.10.4 passed because it predates the breaker pause, startup
subagent reconciliation, and this assertion.

Deterministic proof: the quiet-child e2e twin with SIGKILL restarts and an
exec-blocked child passes with one prior kill; with two warm-up kills it logs
"restart-loop breaker tripped" and the parent continuation never arrives
within 60 seconds; with a 400-second wait it settles and passes (338s).

(cherry picked from commit 1a4c2a0)

* test(qa-lab): skip user-role runtime carriers in visible-child send proof

The sessions_send visible-child proof timed out on every 2026.10.5
candidate: its synthetic provider picked the latest user item that lacked
the legacy <<<BEGIN_OPENCLAW_INTERNAL_CONTEXT>>> marker as the user prompt.

Since openclaw#168546 (backport 8d66b94), OpenAI-compatible Responses
endpoints, including mock-openai, keep runtime context in a user-role
"OpenClaw runtime context:" carrier after the user turn instead of a
developer message. The fixture then read that carrier as the prompt, never
saw the "send" prompt on turn 2, answered PARENT_READY again, and the test
waited for PARENT_DONE until timeout.

Captured provider requests: v2026.10.4 sends the turn-2 carrier with role
developer; the 10.5 tip sends it with role user. Reverting a293f2e
(openclaw#168410) left the failure unchanged.

Select the prompt with the shared qa-lab isInternalRuntimeContextCarrierText
helper, which already accepts current and legacy carrier shapes.

(cherry picked from commit d3a06e7)

* test(buzz): skip real reconnect backoff in cold-start recovery

(cherry picked from commit fa2049a)

* fix(release): let the Telegram release lane finish its 25 scenarios

The isolated Telegram candidate job hit its 60-minute limit at scenario 24/25
on every 2026.10.5 candidate (about 62 minutes needed at 102-108s per packaged
Gateway start). main carries the same Telegram scenario set and job, so
raise the job budget to 90 minutes; the calling release-checks job keeps its
210-minute bound.

Also carry the 2026.10.4 release-line fixture fix for
telegram-prepared-delivery-recovery (8b78670): keep the audit receipt in
the shared Gateway workspace and create it up front so the isolated SUT can
append without EACCES. main still writes it under the private tempRoot.

(cherry picked from commit 3cb49f0, adapted to main's runner anchor)

* test(gateway): probe startup readiness on fresh connections

The deferred-fleet startup test failed twice in 2026.10.5 FRV openclaw#12 with
`fetch failed` / `read ECONNRESET`. Its Gateway shares the test process's
event loop. A /healthz or /readyz probe could reuse a keep-alive socket
that Undici still treated as live; when the request was written and a
synchronous main-thread startup stall followed, the server's idle-timer
callback ran before the poll phase read the request and destroyed the
socket with the request unread, so the kernel reset the connection.

main still probes with default keep-alive fetches. Probe with
`Connection: close`, matching existing Gateway test probes. Assertions are
unchanged.

(cherry picked from commit e3c63f2, adapted to main's probe sites)

* test(live): expect review effort for Skill Workshop background reviews in the Ultra lane

Since openclaw#161057 the Skill Workshop counts iterations per session, so Ultra probe
sessions trigger a background review after idling. The review runs under its
own skill-workshop-review: run and does not inherit the session's thinking
level, so the lane's every-request-is-max assertion failed on 2026.10.5
whenever a review reached the provider.

On main, openclaw#173889 pins review runs to thinkLevel "low" (review-run.ts), which
the OpenAI stream wrapper sends as effort "low". Expect that effort for review
runs; Ultra runs and their sessions must still be max, and independent
heartbeats stay medium.

The live file is over the line cap, so the Ultra wire effort policy moves to
a sibling helper with its observation type, and the deterministic review
cases run in the normal helper suite.

(cherry picked from commit ca15213, adapted to main's review thinking level)

* test(release): forward-port 2026.10.4-line upgrade-survivor and runtime-smoke harness fixes

Release-line harness fixes that 2026.10.1-2026.10.5 carried but main never
received:

- cron-scheduled-authority: seed the cron authority specimen through the
  published baseline's own SQLite writer (seedPublishedCronJobs) instead of a
  raw cron/jobs.json that current candidates treat as a retired pre-July
  store; drop owner fields for pre-2026.7.1 baselines
  (usesCronOwnerAtBaseline). The dispatcher passes the package root to
  seedState, and the scenario now requires a published baseline.
- bundled plugin runtime smoke: join deferred read-only update discovery via
  update.status before the package-manager child watchdog. main still defers
  install discovery (`<manager> root -g`) until after ready, so it can race
  the watchdog's no-package-manager-children check.

Skips the codex npm plugin live source-reply grep from the release commit:
main already probes dynamic-tool-source-reply.ts and dynamic-tools.ts.

(cherry picked from commit fcdf0d1, codex grep hunk dropped; cron seed
test adapted to main's executable-mode fixture writes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant