Repository navigation
feat: add SessionNotFoundError for missing resume targets - #295
Merged
Merged
Conversation
Merged
xxchan
added a commit
that referenced
this pull request
Oct 9, 2026
Release OAR and CLI 0.51.0. This PR changes only the two package version fields. **Added: `SessionNotFoundError`** (#294, #295) - `session({ resume })` rejects with the exported `SessionNotFoundError` when the runtime's own answer says the conversation to resume does not exist. It carries `sessionId` (the requested id) and `cause: { method, native }`, redacted like other open errors. A host can now tell "start over" apart from an auth, quota, model or transport failure without parsing messages. - Signals per runtime ([missing resume targets](https://github.com/botiverse/oar/blob/main/docs/spec/runtime-matrix.md#missing-resume-targets)): - antigravity: `-32002`; - grok: `data.code: "FS_NOT_FOUND"`; - cursor: the SDK's `agent_not_found`; - pi: OAR's own session-file lookup; - kimi and opencode v1/v2: a complete `session/list` walk has no such id and the resume then fails; - claude and codex: the exact native wording ("No conversation found with session ID", "no rollout found for thread id"), pinned by recorded answers. - Any other failed open keeps its current error. That includes codex's other `-32600` refusals (active writer, sub-agent), auth refusals (still `RuntimeFailureError`) and a wrong cwd on kimi or opencode (still `UnsupportedOptionError`). **Behavior changes** - A resume of a missing session now rejects with `SessionNotFoundError` where it used to reject with a plain `Error` or the runtime's `RequestError`; cursor's minified SDK error class is replaced by it. `SessionNotFoundError` extends `Error`, so `instanceof Error` and `message` checks still hold. - For pi and grok, "not found" means not found for the cwd given; resume with the cwd saved with the id. Cursor's means not found by the SDK with this configuration. Validation: #295 passed all 17 checks on its final head (`ad8ea1e`), based on the current main, so the merged tree equals the CI tree. Lookout re-ran the #294 probes (opens only, no prompts): all 16 cases matched the decision, including the must-not-match ones. After this PR passes CI and merges, tag its exact squash commit as `v0.51.0` to trigger npm trusted publishing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: exe.dev user <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
xxchan
added a commit
that referenced
this pull request
Oct 9, 2026
Closes #288. `sea-trial/vendor/credential-redaction.vendor.test.ts` failed on `behavior (windows-latest, claude-aimock)` with `EBUSY: resource busy or locked, rmdir …\oar-claude-credential-test-…` during CI for #280 and again for #295. The claude case points `CLAUDE_CONFIG_DIR` into the test's temp dir. On Windows, claude's files can still be held for a moment after `dispose()`. The three `rm` calls in the file now retry (`maxRetries: 10, retryDelay: 300`), as `mcp-servers.vendor.test.ts` and the aimock harness already do for a runtime's config dir. Test-only; no release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: exe.dev user <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 18, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg" width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_eb46f735f8cb334e59a8fb399286f98c"><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 currently cannot distinguish a directly invocable skill from model-only or unknown metadata across most OAR runtimes. Preserve native invocation booleans for Grok, Factory, Qwen and DSH, derive Devin's value from its user trigger, and report true for Pi entries in its verified native command catalog. Missing or malformed metadata stays absent; enabled and model invocation remain separate. OpenCode v1/v2, Codex, Cursor and Kimi remain unknown. Antigravity will follow separately after #937 merges. Separate OpenCode command queries would add startup cost and require resolving command-name collisions; #938 tracks the recorded native results and timings. These mappings add no processes or network queries. The inventory spec and runtime pages link pinned controls and selected results under `experiments/skill-invocability`. Validation: pinned native controls use isolated homes and synthetic fixtures, without real accounts, paid calls or skill execution. Positive and negative cases preserve native distinctions: Qwen normalizes true to absent and Pi ignores false frontmatter. Six changed-runtime behavior suites passed 110 cases with 10 capability skips; native parity controls for Factory, Qwen, DSH, Devin and Pi RPC pass. Full `CI=1 pnpm run check` passes on main 4786ccf with 4,893 tests and 19 mock cases. Requested by Cindy in task #295. Co-authored-by: Lookout <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 18, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg" width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_e12a453d3f9660a023e255d1e9f06b0e"><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 --> Antigravity's skill catalog establishes which entries have slash commands, but OAR still leaves `userInvocable` absent. Report true for listed entries on both the native query and verified file reader. Skills disabled with `disable-slash-command: true` stay omitted; model-hidden skills remain directly invocable. No query or process is added. The Linux/macOS version boundary, Windows native fallback and partial file inventory stay unchanged. The inventory spec also corrects Claude's existing behavior: descriptions require usable native strings; command-only skills have scope without source/path; builtin commands cannot describe non-builtin skills or create hidden entries; absent invocation metadata differs from false; omitted context skills make the inventory partial. Validation: isolated native 1.5.0 fallback controls and the pinned 1.5.11 Node-loader comparison pass. Six file-reader stages each match three reads, with only the already excluded conditional `native_swarm` mount omitted. Positive and hidden negative fixtures pass with zero model requests. Antigravity behavior passes 18 cases with two capability skips. Windows CI retains the native 1.5.11 path and now checks the hidden negative fixture. Selected native/OAR fields and repeatable controls are committed under `experiments/skill-invocability`. Full `CI=1 pnpm run check` passes: 4919 tests and 19 mock cases. Requested by Cindy in task #295; follows merged #939 and #937. No real accounts or paid calls were used. Co-authored-by: Lookout <[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.
A host could not distinguish a missing resume target from another failed open.
session({ resume })now rejects with exportedSessionNotFoundErroronly for the runtime signals agreed in #294, preserving the requestedsessionIdand redactedcause: { method, native }.Agent.listRunsandAgent.resumeerrors.session/listwalk followed by a native resume failure. Listed sessions, incomplete pagination, authentication failures and wrong-cwd refusals keep their previous behavior.The spec and runtime pages document each mapping and its lookup scope. In particular, Pi/Grok absence is per cwd, and Cursor absence means the SDK could not find the agent under this configuration; this does not prove global absence. No replacement conversation is created and no FailureClass is added.
Validation:
CI=1 pnpm run check(1501 tests passed), build, all five behavior backends, and native vendor suites with mock providers (Claude 39, Codex 35, Pi 34 passed). Targeted regressions cover positive/negative classification, JSON-safe/redacted errors and public missing-resume opens without model requests. Native ACP/Cursor fixtures come from Lookout's October 9 no-prompt probes; the PR does not claim another live-account run.Closes #294.