Repository navigation
Conversation
sessions_send steering into an active run waited for the receiver's next transcript commit with no delivery deadline. A long tool call in the receiving run held that past the 30 s admission deadline, and the timeout result failed the tool output schema, so callers saw an opaque error and retried while the input was still delivered later. Steering now returns at acceptance; the receiving run owns the input until its next model boundary. The durable fallback that only served the commit wait is removed, and the admission-deadline result uses status "error", which matches the output schema. Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
…tody tests Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
…admission write Co-authored-by: obviyus <[email protected]>
…ceiver after a refused commit Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
…esume Shutdown aborts runs only after the one-way restart drain. A restart abort observed during that drain no longer ends the child row as killed; the child session resumes after restart. Reset and rollover aborts outside the drain stay cancellations. Co-authored-by: obviyus <[email protected]>
Interrupted children stay unended at shutdown and resume their own task; the root gets one completion wake with the real result and never sees 'Gateway stopped'. The legacy case reproduces the old Gateway's persisted quiet-kill row explicitly. Co-authored-by: obviyus <[email protected]>
Another local process probing the mock's port sent GET / with no body; JSON.parse of the empty body failed restart e2e tests on base and head. Model requests are POSTs; other methods now get 404 and a log line. Co-authored-by: obviyus <[email protected]>
…esume Shutdown again ends live subagent rows as base does, except a child whose session committed a restart marker: that child resumes its own task after the restart. A child that cannot resume (marker persistence incomplete or not markable) keeps base's settle-and-recover path. Co-authored-by: obviyus <[email protected]>
After each agent's restart resume decisions, a pre-boot subagent row that this boot did not resume, park, or leave marked ends once with the restart error. Fresh requester custody binds first so the outcome is delivered; a requester from another restart scope is never woken and its child ends without delivery. An agent with nothing to resume is still visited. Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: 203ae32d-1cb1-8109-a6a8-c9c60a404dd0
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
…sume own marked children A child settled at shutdown gets no fallback resume marker and restart resume skips it, so its parent is woken once. The sweeper leaves rows whose child session still carries a restart marker to restart resume. Reactivation continues only a running, unkilled row. Steering acceptance never waits for runtime persistence; the commit-time stamp runs detached. An archived requester takes the no-delivery path. Docs describe child self-resume and the steering receipt. Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: 087b4773-b7db-8a0c-b017-ca403b030b7c
… sweeps on marker read errors Co-authored-by: obviyus <[email protected]>
OpenClaw-Publication: 730c77c0-e505-8949-89e8-c0a33deabc5f
## What Problem This Solves When a parent agent sends a message to its own child while the child is busy in a long tool call, `sessions_send` waits about 30 s and then reports an error. The message does reach the child, but the parent thinks the send failed and often retries or gives up. ## User Impact User impact: a parent's message to a busy child now returns at once as `accepted` / `steered`, and the child still sees the message at its next steering boundary. ## Why This Change Was Made - Steering returns at acceptance. Once the receiving run accepts a steered message, it owns that message until it commits it or the run ends. `sessions_send` no longer waits for the transcript commit. The durable-fallback and commit-wait path for `sessions_send` steering is removed. - Admission-only contract: after acceptance, the receiving run owns the steered input until it commits or the run ends; a refused commit is never seen by the model, and custody is released exactly once when the run ends. - The tool deadline result now uses the schema's `error` status instead of a `timeout` shape the schema did not allow. Models see this change. - The `steerTargetRunId` stamp is written on the committed transcript row as part of the admission write, and confirmation no longer waits for runtime persistence. This also stamps plugin steering, which previously had no stamp. - Commit-wait (`waitForTranscriptCommit: true`) and its `timeout` status remain for the other callers (announce, `chat.send`, steer adoption). Known window: if the receiving run is cancelled or fails, or the Gateway restarts, between acceptance and the next steering boundary, the steered message is withdrawn although the sender holds `accepted`. Plugin steering on main already has this window. On main's restart model, a restart stops the child and wakes the parent, so the parent learns the child was interrupted and can resend. Making accepted steers survive a restart needs a replay-authority decision and is not part of this PR. Split from #202111. The restart half of that PR is parked as reference, because main's own restart model now owns that class. ## Evidence Real Gateway journey on a built Gateway (isolated state, real model), current main vs this branch. The parent spawns a child doing a 75 s exec, sends it a MARKER with `sessions_send`, then waits: | | main (`416b357c`) | this branch | |---|---|---| | `sessions_send` call → result | 30,066 ms, `error` | 74 ms, `accepted` / `steered` | | Steered MARKER row in the child, and the MARKER in the child's final reply | 1 row, stamped; in the final reply | 1 row, stamped; in the final reply | Tests: - Steering receipt at acceptance (red on main: the steering-provenance test hangs 120 s, and the admission test returns `status: "timeout"`). - The commit stamp is written for uncommitted messages. - Steering custody is released exactly once when the receiving run ends, including the source-revoked case (the refused commit never reaches the transcript). - The plugin steering contract now expects the stamp. - Suites: sessions_send 11/13/132, user-turn transcript 89, steering custody 5, all green. tsgo and lint are clean. Production code: +32 / −48 (net −16). The stamp now joins the admission write without an extra run-id comparison (session-identity ratchet). One drive-by lint fix: `agent-step.ts` drops a default `callGateway` type argument that the changed-lint lane flagged. **Merge danger:** - Two-way door: no schema, config or stored-state change. - Blast radius: agents that steer a busy session with `sessions_send`, and plugin steering stamps. Co-authored-by: Ayaan Zaidi <[email protected]>
## What Problem This Solves When a parent agent sends a message to its own child while the child is busy in a long tool call, `sessions_send` waits about 30 s and then reports an error. The message does reach the child, but the parent thinks the send failed and often retries or gives up. ## User Impact User impact: a parent's message to a busy child now returns at once as `accepted` / `steered`, and the child still sees the message at its next steering boundary. ## Why This Change Was Made - Steering returns at acceptance. Once the receiving run accepts a steered message, it owns that message until it commits it or the run ends. `sessions_send` no longer waits for the transcript commit. The durable-fallback and commit-wait path for `sessions_send` steering is removed. - Admission-only contract: after acceptance, the receiving run owns the steered input until it commits or the run ends; a refused commit is never seen by the model, and custody is released exactly once when the run ends. - The tool deadline result now uses the schema's `error` status instead of a `timeout` shape the schema did not allow. Models see this change. - The `steerTargetRunId` stamp is written on the committed transcript row as part of the admission write, and confirmation no longer waits for runtime persistence. This also stamps plugin steering, which previously had no stamp. - Commit-wait (`waitForTranscriptCommit: true`) and its `timeout` status remain for the other callers (announce, `chat.send`, steer adoption). Known window: if the receiving run is cancelled or fails, or the Gateway restarts, between acceptance and the next steering boundary, the steered message is withdrawn although the sender holds `accepted`. Plugin steering on main already has this window. On main's restart model, a restart stops the child and wakes the parent, so the parent learns the child was interrupted and can resend. Making accepted steers survive a restart needs a replay-authority decision and is not part of this PR. Split from openclaw#202111. The restart half of that PR is parked as reference, because main's own restart model now owns that class. ## Evidence Real Gateway journey on a built Gateway (isolated state, real model), current main vs this branch. The parent spawns a child doing a 75 s exec, sends it a MARKER with `sessions_send`, then waits: | | main (`e9b9f42d`) | this branch | |---|---|---| | `sessions_send` call → result | 30,066 ms, `error` | 74 ms, `accepted` / `steered` | | Steered MARKER row in the child, and the MARKER in the child's final reply | 1 row, stamped; in the final reply | 1 row, stamped; in the final reply | Tests: - Steering receipt at acceptance (red on main: the steering-provenance test hangs 120 s, and the admission test returns `status: "timeout"`). - The commit stamp is written for uncommitted messages. - Steering custody is released exactly once when the receiving run ends, including the source-revoked case (the refused commit never reaches the transcript). - The plugin steering contract now expects the stamp. - Suites: sessions_send 11/13/132, user-turn transcript 89, steering custody 5, all green. tsgo and lint are clean. Production code: +32 / −48 (net −16). The stamp now joins the admission write without an extra run-id comparison (session-identity ratchet). One drive-by lint fix: `agent-step.ts` drops a default `callGateway` type argument that the changed-lint lane flagged. **Merge danger:** - Two-way door: no schema, config or stored-state change. - Blast radius: agents that steer a busy session with `sessions_send`, and plugin steering stamps. Co-authored-by: Ayaan Zaidi <[email protected]>
|
Closing to free a slot under the 20-open-PR cap. This was a parked reference marked 'Do not merge'. The branch stays, so it is still available as a reference. |
Parked as reference. Do not merge.
steerTargetRunIdstamp at commit, custody tests) moved to fix: return a busy child's steering receipt at once #202139, rebuilt on current main.delegation-steer-durableholds an unmerged attempt at durable steer staging. It is waiting on a replay-authority decision.The commits stay here for reference: child self-resume, restart-drain guard, shutdown settle of unmarked children, startup settle with fresh custody, fixes for the Fable findings, and the jd2 journey evidence from the previous description.