Repository navigation
feat(tasks): expose native single-task stop and lifecycle facts - #659
Merged
Merged
Conversation
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 6, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_3f1a284aa0f49a88dbff2bcb7f4ff154"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> Hosts can stop one native task without aborting its parent, on Claude, Codex and Qoder. Grok, Qoder and Qwen now report their task lifecycle. ## `Session.stopTask(taskId)` (#659) - Optional; exposed on Claude, Codex and Qoder. Pass the `taskId` from a task event. - **Accepted means only that the runtime acknowledged the request.** It is not a task-ended fact: watch for the runtime's own `task_ended`. Claude and Qoder can acknowledge an unknown id. - It does not abort the parent, clear its queue or dispose the session. - Codex interrupts the current turn of an observed child thread. Interrupting a child's turn does not end the task, because the parent can send that child more work, so OAR emits no `task_ended` from it. Unknown ids are rejected `unsupported`, and a child with no observed active turn is rejected `no_active_turn`. - On Claude and Qoder, an unanswered request rejects after 30 seconds without killing the runtime, and a late reply stays a raw frame. - Grok has no `stopTask`: cancelling a child session left it running. Qwen has no verified host control. **Public type change:** `ControlAction` and `RequestBody` gain `stop_task`, so exhaustive switches must handle it. ## Task events on more runtimes (#659) - Grok, Qoder and Qwen now project their native lifecycle messages to the existing `task_started`, `task_updated` and `task_ended`. There is no new event kind. Fields the runtime does not report stay absent. **Evidence:** Claude 2.1.318, Codex 0.167.0, Grok 1.0.77 and Qwen 0.26.8 with local providers on Linux. Qoder 1.1.83 used a Free login with a DeepSeek pay-as-you-go model, not a first-party plan, and the result of a later parent prompt after a stop stays unconfirmed. CI still pins Qoder 1.1.81. See `experiments/task-controls/README.md`. ## Docs - A usage verdict describes the account the probe selected, not every account on that runtime, so a host scopes a stall to the runtime and the account. `KIMI_CODE_HOME=/home/b oar usage kimi` and `KIMI_CODE_HOME=/home/b oar orient kimi --depth account` already switch account, with no flag; this works from 0.90.0 (#658, #655). - The process priority section no longer overstates who may lower an OOM score (#654). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosts can stop one native task through optional
Session.stopTask(taskId)on Claude, Codex and Qoder. Each call records its native acknowledgement; it does not abort the parent, clear its queue, or fabricate task completion. Codex targets only an observed descendant's current turn, and the same child can receive later work.Grok, Qoder and Qwen now project their native lifecycle messages into the existing task events. Grok and Qwen have no
stopTaskmember: targeted Grok cancellation left the child running, and Qwen has no verified host control. Native attribution, missing fields and usage ownership are preserved.Evidence, exact versions, reproduction scripts and release-note draft are included. The Qoder 1.1.83 foreground/background stop evidence used a Free login with a DeepSeek pay-as-you-go model, not a first-party plan. Its later parent-prompt result remains unconfirmed; the report preserves the extra native error without inventing a cause. CI still uses Qoder 1.1.81, whose unknown-task acknowledgement is separately covered.
Validation: full check and mock behavior, all 16 behavior backends, complete Claude/Codex/Grok/Qoder/Qwen vendor suites, build and clean package installation on Linux. New native cases cover Claude foreground and background stops, Codex child reuse after interruption, and Qwen task notifications. Unit regressions cover concurrent replies, timeout/exit/disposal, late responses, root queue preservation, descendant ownership and credential redaction. Windows/macOS results remain for PR CI.
Release note for hosts:
ControlActionand the request-body union gainstop_task. Exhaustive switches over these public unions must handle the new case. Other sessions still omitstopTaskwhen no native control is verified.