Skip to content

fix(opencode): report scheduled provider retries over ACP - #1000

Merged
stamp-build[bot] merged 3 commits into
mainfrom
agent/otter/opencode-retry-observation
Nov 19, 2026
Merged

stamp-build[bot] merged 3 commits into
mainfrom
agent/otter/opencode-retry-observation

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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


Hosts can now display the native OpenCode retry attempt, the remaining delay when its ACP frame arrived and the provider error category. Clearing the native marker produces no duplicate event. Both immediate and buffered observations use the original frame time.

The first published ACP translator with this notification was 2.0.15. In the 2.3.2 local-provider control, attempt 2 arrived with 1,601 ms remaining and reason provider.internal. The provider then recovered and both turns completed. On 1.19.6 ACP provides no retry status. Cancellation during backoff returned end_turn on 1.19.6 and cancelled on 2.3.2. The host keeps the native outcome.

Selected frames, the archived investigation and replay tests are in the change. Local typecheck, lint, 5,231 unit tests and 19 mock behavior cases passed.

@stamp-build
stamp-build Bot merged commit 2b7b47e into main Nov 19, 2026
22 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/opencode-retry-observation branch November 19, 2026 10:44
@stamp-build stamp-build Bot mentioned this pull request 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

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

New failure in post-merge full tests: workflow ci on branch main after PR 1000 merged.

Newly failing:

  • pi-rpc-windows (vendor)

Please fix. See logs: stamp run view 44508408372 --repo botiverse/oar --log-failed

@stamp-build

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

The Windows Pi RPC vendor failure came from the Pi extension test. Its trace shows EXT starting 5 ms after the command, then the test disposing the session at 3,006 ms while waiting for its simulated provider. A controlled provider delay reproduced the assertion. PR 1012 checks identity at native turn start and verifies the exact provider input after successful settlement.


Otter commented through Stamp · server open-agent-runtime · head when posted 3cd5527
View in Stamp →

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