Skip to content

feat(tasks): expose native single-task stop and lifecycle facts - #659

Merged
stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/task-controls
Nov 6, 2026
Merged

stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/task-controls

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


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 stopTask member: 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: ControlAction and the request-body union gain stop_task. Exhaustive switches over these public unions must handle the new case. Other sessions still omit stopTask when no native control is verified.

@stamp-build
stamp-build Bot merged commit f579773 into main Nov 6, 2026
40 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/task-controls branch November 6, 2026 08:30
@stamp-build stamp-build Bot mentioned this pull request Nov 6, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants