Repository navigation
fix(runtime): align native settlement, inventory scope and host guidance - #1002
Merged
Merged
Conversation
Co-authored-by: xxchan <[email protected]>
Co-authored-by: xxchan <[email protected]>
Co-authored-by: xxchan <[email protected]>
Co-authored-by: xxchan <[email protected]>
Co-authored-by: xxchan <[email protected]>
This was referenced Nov 19, 2026
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]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 19, 2026
…1006) <!-- 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_8baa0aafe2c187e158d8a81aec0d9894"><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 --> Follow-up to #997 and #1002 on the DSH and manual compaction pages. - `docs/spec/manual-compaction.md`: DSH gets its row in the table of records that release manual compaction (the `compact` command answer or error for the request's command id, after the matching start and end), joins the `settledBy: "native_response"` list (`dsh/compaction.ts:59`), and its scope row now reads "Supported, idle only" like the other idle-only runtimes. - `docs/runtimes/dsh.md`: image input leaves "Open risks", since #997 verified it through text-plus-image, image-only and resumed queued input. Docs only. The docs and spec link tests pass locally. 🤖 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.
Factory now releases its input reservation on the correlated native compaction result or refusal. It drains queued input when Droid hands a prompt back, including when no turn-end notification follows. A summary notification alone cannot claim a manual request. A buffered turn end can arrive before initialization completes, so Factory sets up input dispatch before replaying native notifications. The scripted native abort control waits for the model request and reads the outcome from the originating prompt, covering the timing race reported on main in run 44485550797.
Pi declines an inventory environment that would change the in-process SDK's discovery scope. Cursor leaves pre-open manual compaction unknown and exposes compact on agents that supply summarize. The runtime and contract pages document these limits, preserve dated native observations and point readers to the live definitions for fields and enumerations.
The three Factory replay regressions failed on the original implementation. A fourth control reproduced an uncaught ReferenceError when Droid sent a turn end during initialization. All 14 Factory session tests passed after the fix. Both 1.12.1 and 1.14.0 passed the eight native Factory vendor cases. CodeBuddy 2.185.0 advertised loadSession with no resume capability in an isolated ACP initialize response. The SDK and orientation tests cover the environment and declaration changes. No account was used.
On main 2b7b47e, the full local check passed with 5,242 unit tests and 19 mock cases. All 19 new local documentation link targets resolve.