Repository navigation
fix(observe)!: keep untracked content outside turns - #953
Merged
Merged
Conversation
stamp-build
Bot
force-pushed
the
agent/otter/antigravity-active-turns
branch
from
November 18, 2026 15:55
0f1ad31 to
8b61823
Compare
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 19, 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_9ca5c5e14797297ac929e3d33fabeeec"><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 --> Forking a saved session, Gemini quota notices with reset times on Antigravity, and bounded native queries. **One breaking change for hosts that consume the session view:** content that arrives outside a turn no longer joins a running turn (#953, below). ## Breaking: content outside turns stays outside them (#953) Root text or tool updates can arrive after a native turn has ended, with no new start (Antigravity 1.5.10 and 1.5.11, an OpenCode own-reply sample). OAR used to show such a session as running indefinitely while there was no active turn to abort. Now the status fold keeps it idle with `activity: { since, lastEventAt }`, and the view keeps that content in its own message, `ViewMessage` `kind: "activity"`. A later prompt or verified native start opens a new turn without moving earlier activity into it. Late tool updates still amend their original entry, and process exit closes unresolved tools. Consumers of `reduceSessionView` need a branch for `kind: "activity"` (type `ViewActivity`), and must replay a preceding start or a full checkpoint when they rebuild a running session. ## `SessionOptions.fork` (#888), feature With `resume`, `fork` opens a new native session that starts as a copy of a saved one, optionally cut after a given turn (`fork.through`), and leaves the source untouched. `Session.id` is the copy's id (new type `SessionFork`). The root `turn_ended` event carries `forkAnchor` when the runtime has a usable cut point, and `reduceSessionView` puts it on `ViewTurn.forkAnchor`, so a host can offer "branch from here" without reading native frames. - Claude: `--resume <source> --fork-session --session-id <new id>`, so OAR assigns the copy's id, with `through` as `--resume-session-at`. There is no `forkAnchor` on an aborted turn, or when the turn's last root assistant message holds a tool call or is followed by a tool result. `--fork-session` and, with a fork, `--resume-session-at` stay refused in `launchArgs`. - Codex: `thread/fork` with `lastTurnId`; the copy's id is the thread id Codex returns. `through` needs codex 0.143.0 or later and is `runtime_outdated` before anything is sent on older versions or when Codex does not report its version. A Codex fork reports no token totals, because its total includes the source's turns. - Every other runtime declares `fork` in `refusedSessionOptions` (new `RefusableSessionOption`). ## Antigravity: Gemini quota notices, whole-turn usage and credits (#982), fix agy 1.5.12 can end a refused turn with a normal `end_turn` whose whole output is its "Individual quota reached ... Resets in 4h12m." notice. OAR now reports that turn as `failure: "quota"` with `resetsAt`, but only when the entire native output is that exact notice and the reply carries no usage; quoting the notice inside an answer stays `completed`. A prompt RPC error carrying the same sentence also supplies `resetsAt`. The reset has the precision of the smallest unit agy prints, so a retry at that time can still be refused. - Token totals now come from the prompt reply, which covers every model call in the turn (two calls of 108 tokens report 216). Input is `totalTokens - outputTokens`, including cache reads; thought tokens count inside output; a reported zero cache write stays zero. - When every model group is used up, the account snapshot now includes `credits` from agy's own `/credits` answer: `{ available, balance }`, with `balance` a decimal string. Absent means OAR did not ask or could not read a number. - The antigravity page records that `usage_update.used` is the current context size on 1.5.12 with a real Gemini account (#981). ## Codex: quota reset times (#962), fix Codex quota failures now carry `resetsAt` from the current turn's exhausted window when it is attributable to this session's root turn, and from the provider body preserved in a remote-compaction HTTP 400. Conflicting resets, child-thread activity and streamed failures that lost the body stay without one. ## Native queries are bounded and clean up after themselves (#978), fix The shared query deadline now covers startup, the native read and cleanup. An owned child process tree is stopped even when startup finishes late; at the deadline the caller returns while shutdown finishes; a completed read keeps its value if only cleanup is slow. This fixes droid and its tools staying alive after `authStatus()` returned `unknown` against a stalled Factory peer, and the same ownership gap in several model and skill readers, including Cursor while its SDK subprocess starts. OpenCode model listing applies the deadline to its version probe too and rejects an invalid budget before starting. Login subprocesses get the same process-tree shutdown, and Antigravity `logout()` keeps a successful native logout when the status check after it fails. ## Process cleanup when a runtime runs as another user (#963, #964), fix Contributed by builder (airwing). With a `sudo -u <worker>` wrapper as the runtime command, signalling the worker's processes gets `EPERM`. That is no longer a failed cleanup: Codex's abort cleanup reports those processes as `SessionCleanup.foreign`. On POSIX, OAR no longer waits forever for output pipes that a leftover background process holds open after the root exits: it closes its ends after 2 s and names them in the `exited` reason, leaves unread data to a busy reader, and stops watching after a further 60 s. ## `dispose()` after a native exit (#979), fix If the native process exits on its own before the host calls `dispose()` (seen on Pi RPC), `dispose()` now resolves at once instead of never answering. Concurrent callers share one disposal. ## Claude: `userInvocable` only from the skill's own command (#950), fix `true` now needs the skill's own entry in Claude's command list. A duplicated name, or a project skill shadowed by a builtin command, stays unknown, and `false` is claimed only for user and project settings skills. ## Also - Docs: runtime pages and specs now keep what the code cannot say, and refer to the code for the rest (#971, #973, #977). Fork and turn-control refusals are complete on every page (#970, #972). An `OAR_<RUNTIME>_BIN` override is the only candidate when it is non-empty (#980). OpenCode v1 automatic compaction over ACP is documented (#969). Kimi docs match current adapter behaviour (#957). November 18 runtime version check recorded (#967). - harbor, the long-run test host: channel rules travel in the appended system prompt, so they survive compaction (#968). - CI: the Antigravity ACP baseline moves to 1.5.11 (#956). Tests: clearer diagnostics and fewer flakes for Antigravity, Kimi, Grok, Pi, shell children and startup refusals (#949, #951, #952, #954, #959, #960, #961, #966). - README: dsh-engine-switch added to projects using OAR (#974). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]> Co-authored-by: xxchan <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 19, 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_74f624735784867c94839028017dbdf8"><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 --> One answer per installed runtime for hosts that integrate OAR without per-runtime code, OpenCode 2.x system prompts and whole-session fork, DSH background job stops, writable roots, images and manual compaction, and the previous sign-in after a login expires. **Behavior changes for hosts:** malformed `resume` ids are refused, a Claude resume must be confirmed by claude, some static declarations moved into the per-installation answer, and Pi inventories refuse a different `env` (below). This release also corrects the 0.121.0 notes on #953. ## Correction to 0.121.0: #953 also changed `status()` The 0.121.0 headline said only session-view consumers were affected. `status()` changed too: root content outside a turn leaves it idle with `activity: { since, lastEventAt }`, cleared by the next turn start or exit. A host that treated recent content as running must read `activity` instead; such a session has no turn to abort. ## Behavior changes - `SessionOptions.resume` that is blank, starts with `-`, or contains NUL is refused with `UnsupportedOptionError` (`option: "resume"`) on every runtime, before any process starts. - Claude: a plain `resume` is now confirmed with `get_status`. If claude resolves the value as a session title to a different native id, the open is rejected and the process stopped, instead of recording the title as `Session.id`. A resume also fails, and the process is stopped, when `get_status` reports no id or does not answer within 30 seconds. An unmatched title on 2.1.326 and later is `SessionNotFoundError`. - Claude, Qwen and Qoder pass session ids as `--flag=value` (#994). - Some static declarations moved into `sessionCapabilities(installation)`: OpenCode's static map no longer lists `fork` (v1 refusals are per installation, #996), Cursor no longer declares `manualCompaction` (#1002), and DSH no longer declares `images: false` (#997). A host reading only the static fields must switch to the installation answer. - Pi inventories called with an `env` that differs from the host process now return `unsupported` (`scope_unavailable`), since the in-process SDK would search a different scope (#1002). ## One capability answer per installation (#992, #995), feature A host can now decide what to offer for a runtime from data alone, before opening a session. - `Runtime.sessionCapabilities(installation)` returns this installation's complete answer: `steer`, `images`, `refusedSessionOptions` (the static map plus refusals a release adds below its floor), `manualCompaction`, and `compactionEvents: { started, ended }` when established. `defineRuntime` merges the static declarations; `installedSessionCapabilities(runtime, installation)` does the same for any `Runtime`. A test or host that compared this answer to only `steer` and `images` now also sees the static refusals (#1001). - `Runtime.verifiedPlatforms`: where OAR's behavior suite ran the real binary or SDK in CI (one table, kept equal to the CI manifest). Absent means unknown, not unsupported. - `Runtime.credentials`: the shape of what a runtime reads on its own, never a value: environment variables with `purpose` and `secret`, and the stores it manages (`kind`, `directoryEnv`, default directory, path, whether it wins over the environment). DSH declares `DEEPSEEK_API_KEY` and, in precedence order, `$DSH_HOME/.credentials.yaml` (wins over the environment), the session directory's `.env` and `$DSH_HOME/.env`. Other runtimes follow with native evidence. - `orient()` carries `sessionCapabilities` for each available installation, and the platform and credential facts for every entry. The report is plain JSON. ## Previous sign-in after expiry (#988, #990), feature New optional `LastAccount { email, displayName }` on a logged-out status and on a `reauth_required` or `unavailable` usage result, when the runtime still names the previous account. - Claude 2.1.327 keeps its account profile after a rejected refresh; explicit logout erases it. - Grok 1.0.89 keeps the previous email in its auth-info extension until native logout. - Codex, Cursor, Kimi and Devin drop the identity; CodeBuddy, Antigravity and Qoder record which paths were checked (experiments/remembered-accounts). ## OpenCode 2.x - `systemPrompt` from 2.2.0 and `appendSystemPrompt` from 2.0.30, through the session-local configuration overlay (#989). The system prompt goes on every visible primary agent; subagents and hidden agents keep theirs. Below each floor the option is refused before any native query, and shared placement refuses both. After a resume, OpenCode keeps the earlier appended text in its saved system snapshot with a native "no longer apply" note. - `SessionOptions.fork` copies a whole v2 session through ACP and binds the copy's reported id; `fork.through` is refused because the native handler accepts only the source id (#996). V1 keeps its refusal. Hosts can read each release line's manual compaction support and v1 refusals before opening. Explicit upgrades use the v2 executable's own updater. - Root prompt totals from 2.0.22 cover every step of the turn (a two-step turn that used to report its last step's 220 tokens reports 330), with cache reads and writes in input and thought tokens in output (#985). - Scheduled provider retries from 2.0.15 are reported as a `retry` event with attempt, remaining delay and error category (#1000). On 1.x ACP gives no retry status, and cancelling during backoff returns `end_turn`, which OAR keeps as the native outcome. ## DSH (#987, #997) - Stop a host's own backgrounded shell job; a foreground shell and a peer job keep running. - Extra writable directories on Linux and macOS from 0.2.2-rc.3, re-registered on resume; older releases and Windows refuse them. - Image input where the route supports vision; a text-only route refuses the whole input. - Manual compaction on an idle session, confirmed by the native command and compaction ids; automatic compaction reports both boundaries. - A resumed session restores its saved request window, so context usage has a window again without a new request (#987). ## Fixes - Claude: one compaction start per agent, including automatic recovery after a context overflow, and a failed manual compaction reports its end (#984). Qoder uses the same mapping. - Grok with `endTurnProcessesOnAbort: true`: an accepted abort stops only the terminals of the confirmed root turn after it ends as aborted; compaction and child activity cannot pass ownership to a later prompt (#999). - Antigravity: one realpath workspace boundary for file skills, plugins and manifests, covering six escape paths (#993). - Factory releases its input reservation on the correlated native compaction result or refusal, and drains queued input when droid hands a prompt back without a turn end (#1002). Cursor leaves manual compaction unknown before open and offers it on agents that supply `summarize()`. ## Community: Cybion (#965), feature Contributed by zccz14. A community runtime over Cybion's Agent API, exported from `@botiverse/oar/community` and added by the host with its deployment and API key. The Thread id is `Session.id`, so `resume` reattaches to the server's conversation. Steer reuses the input route, abort uses the cancel route Cybion's own UI calls, and images travel inline. Model listing, account usage and inventories are unsupported, and a `model` or `effort` that differs from the stored one on resume is refused. Live turns, resume, cancel and steer were observed against cybion.ntnl.io on 2026-11-18. ## Also - Docs: queue, resume and Factory record descriptions corrected (#986); native resume frames distinguished from stream positions (#991); runtime and contract pages point to live definitions (#1002). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]> Co-authored-by: xxchan <[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.
Root text or tool updates can arrive after a native turn ends without another lifecycle start. Antigravity 1.5.10/1.5.11 and the recorded OpenCode own-reply sample demonstrate this: OAR previously displayed an indefinitely running turn while its controller had no active turn to abort. The shared status fold now keeps that content idle with
activity: { since, lastEventAt }, and the view retains it in a separateViewActivitymessage. A later prompt or verified native start opens a new turn without moving earlier activity into it. Late tool updates still amend their original entry; process exit closes unresolved tools.Breaking:
ViewMessagegainskind: "activity", and bare content no longer adopts a running turn. Consumers need an activity branch and must replay a preceding start or full checkpoint when reconstructing a running session. The Pi Durable demo is updated. Ferry acknowledged its consumer changes for the next upgrade; Cindy confirmed the Raft daemon does not consume this view.The report separates native ACP facts from experimental SQLite observations. Six short native controls missed the persisted busy state; no product database reader or inferred completion timer is added. A 1.5.11 control sent a new instruction during native own work and verified that the next model request contained it and the reply followed it. Only cited selected evidence is committed; complete captures remain retained locally. Synthetic local providers only, no real-account requests.
Validation: all nine mapped native-start controls preserve earlier activity; regressions cover replay/checkpoints, new prompts, child attribution, late tools, exit and the recorded OpenCode case. All 16 behavior backends passed with CI-pinned binaries. Full local check passed 4,955 tests and 19 mock cases after rebase onto current main.