Repository navigation
fix: a probe timeout rejects account usage; multi-runtime commands report each failure - #156
Merged
Merged
Conversation
…port each failure docs/spec/account-usage.md: operational failures, timeouts included, reject. The claude and kimi readers instead answered `unsupported` when a native process timed out: claude's `--help` probe for `--safe-mode` (`unsupported_installation`, after the 15 s default whatever the caller's `timeoutMs`) and kimi's `kimi provider list --json` (`auth_configuration_unavailable`). Both now reject with the process diagnostics, as readExecutableVersion does; a run that exits with a code keeps its old answer. claude's probe takes the caller's `timeoutMs`. `oar installation`, `models`, `usage`, `skills`/`mcps`/`tools` and the MCP `runtimes` tool gathered runtimes with a bare Promise.all, so one runtime whose probe or read rejected aborted the whole command with no output. Each runtime's failure is now its own `error` entry, the others still report, and the exit code is 1, as `oar upgrade` and `oar login --status` already do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…be sites `AccountUsageReadOptions.timeoutMs` now bounds the whole read, as kimi and codex already did. claude's help probe and query share one deadline (default 30 s, the two 15 s budgets it replaces); grok's requests share one (default 10 s, was 10 s per request). The contract and docs/spec/account-usage.md say so. `assertRan` (shared/executable/diagnostics.ts) is the one rule that a command that timed out or never ran throws `processFailure`; version.ts, installation.ts and the claude and kimi readers use it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
grok's default becomes 30 s for the whole read (one grok start and up to four requests), like claude and kimi; codex's 8 s is unchanged. `remainingMs(deadline, name)` (shared/deadline.ts) replaces the claude, grok and kimi copies; its timeout reads `<name> timed out`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
xxchan
added a commit
that referenced
this pull request
Oct 7, 2026
Release OAR and CLI 0.26.0. This PR changes only the two package version fields. **New** - cursor `login` and `authStatus` through the SDK's own `Cursor.auth` (#146): the URL is relayed as an `auth_url` event and the login ends on its own once the user signs in on any device; nothing is pasted back. `LoginAccount.expiresAt` (a `UtcInstant`) carries the expiry of cursor's minted key (90 days). Needs `@cursor/sdk` 1.0.36, which 0.25.0 already pins. Passed a real-account checklist on a fresh Linux machine. `oar login cursor` works through the existing command. - `experiments/cursor-login`: the real SDK login against a local mock backend, to run on every `@cursor/sdk` upgrade (#150). **Fixes** - Executable probes (`--version`, `--help`, login status) default to 15 seconds instead of 5, after repeated Windows `.CMD` start-up timeouts (#155, closes #57). - Account usage: a probe that times out or fails to start rejects instead of answering `unsupported` (claude, kimi); `timeoutMs` bounds the whole read, default 30 seconds for claude, kimi and grok (#156). - CLI: `oar installation`, `models`, `usage`, `skills`, `mcps`, `tools` and the MCP `runtimes` tool report a failing runtime in its own entry instead of losing every runtime's output; the exit code is 1 when any failed (#156). **Not host-facing**: live probe model defaults (#153), cursor docs (#157). Validation: `pnpm run check` passed locally on #146 after its rebase; all 13 checks passed on the final heads of #146 and #150. After this PR passes CI and merges, tag its exact squash commit as `v0.26.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]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 2, 2026
<!-- stamp:review:v1 --> <sup><img src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp" width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_1fa4dd995bda681621703ef81c293b8b"><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 --> Claude and Codex resumed prompts were refused after observing only the first resumed request. Native compaction changes that result: Claude's replacement and append, and Codex's append, use the newly supplied value after compaction. Omitting them instead drops the saved override at that point. This change forwards those native options and removes the incorrect refusals. `Runtime.resumedSessionOptions` declares two independent facts per option: when a different supplied value takes effect, and what omission does. The optional map uses `SessionOptions` keys; absent entries mean untested. Claude, Codex, Qwen, Pi SDK/RPC and Pi Durable have measured declarations. Refusal declarations remain authoritative. OAR does not compare prompt strings, inject instructions or add a compaction control. All declared prompt options have native regressions for supplied and omitted values before and after compaction. Claude uses `/compact`, Qwen uses `/compress`, and Codex/Pi use native automatic compaction. Qwen must report native completion with a smaller token count; Qwen/Pi must also place a unique native summary in the next main request's history. Sequential resumes track the current saved value. A registry-wide test fixes the declaration inventory and prohibits overlap with refused options. Host migration: pass the current Claude/Codex prompts on every resume to retain them after compaction. Codex replacement instructions survive omission. Grok append-only sessions are the exception: omit append on resume to retain the saved value; to change it, also supply replacement instructions. A retained native Grok compaction probe supports that exception. The spec, runtime pages, public JSDoc, root example and decision reversing #469 are updated; the old dated report keeps its original text with a correction. [Evidence and release-note draft](https://github.com/botiverse/oar/blob/e052eb83297fd77e1c2481e0280ab6acbad62953/experiments/resume-prompts-2026-11-02.md). Validation: - Complete local check: 2,991 tests and 18 mock behaviors; build passed. Packed public type consumption was verified for the unchanged exported types. - All 19 declaration-driven native controls passed; the full Durable vendor file also passed. - Eight original Claude/Codex mutation controls and eight added Qwen/Pi runtime/dimension mutation runs failed their expected assertions. Durable's incorrect `saved_until_compaction` declaration now fails after compaction; Qwen/Pi's incorrect `saved` declaration expects the preceding resume's new marker. - Existing Claude/Codex/Grok behavior and vendor regressions passed. Local native observations are Linux x64 against scripted providers. Cross-platform validation is pending this revision's CI. Codex declarations were exercised with local compaction; ChatGPT remote compaction was only inspected in native source, not exercised. Conditional Grok/OpenCode support and unmeasured Qoder/CodeBuddy omission remain undeclared. Qwen's compaction-status attribution is a separate task (#156). Task #153. No version bump; release timing belongs to Cindy. --------- Co-authored-by: Otter <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 2, 2026
<!-- stamp:review:v1 --> <sup><img src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp" width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_575cc26d993621290a144fbb0219cc4e"><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 --> Qwen 0.26.5 emits manual compression status as assistant text and exposes no automatic compression frame in stream-json. A user `compress.toml` can replace `/compress` with a model prompt, so neither the output text nor the submitted command safely identifies compaction. Document this limit in the Qwen runtime page and record-stream contract without changing the adapter. Keep a reproducible native probe, portable selected evidence and an unsubmitted upstream issue draft requesting structured manual/automatic compaction observations and resolved command origin. Validation: native manual, automatic and overridden-command controls pass on Linux x64. Both compaction controls verify the unique summary reaches the next main provider request; an ordinary model response reproduces the native status verbatim. Full check passes (2,991 tests and 18 mock behaviors). The selector reproduces the committed evidence byte for byte. Other platforms are not claimed. Tracks task #156. The issue draft is for Cindy to decide whether to submit. This PR does not change product behavior or the release version. Co-authored-by: Otter <[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.
What
Two related gaps found in today's inspection round (verified with fake executables and the built CLI; a codex refuter did not refute them).
1. claude and kimi account usage answer
unsupportedon a timeout. docs/spec/account-usage.md says operational failures, timeouts included, reject the promise. codex and grok do. Two readers did not:supportsSafeModereturned false for any failedclaude --help, a timeout included, so the read answeredunsupported/unsupported_installation, telling the host this CLI cannot be read. The probe also ignored the caller'stimeoutMsand waited forrunExecutable's 15 s default.resolveKimiAuthreturned null for any failedkimi provider list --json, so a timeout answeredunsupported/auth_configuration_unavailable.Both now reject with the process diagnostics when the run timed out or never ran. That rule is now one function,
assertRaninshared/executable/diagnostics.ts, used byreadExecutableVersion, the installation readiness probe and both readers. A run that exits with a code keeps its old answer.AccountUsageReadOptions.timeoutMsnow bounds the whole read (contract comment and docs/spec/account-usage.md), as kimi and codex already did: claude's help probe and query share one deadline (default 30 s, the two 15 s budgets it replaces), and grok's start and requests share one (default 30 s, was 10 s per request, up to four). claude, kimi and grok now all default to 30 s for the whole read; codex's 8 s is unchanged. The budget arithmetic is one function,remainingMs(deadline, name)inshared/deadline.ts, used by the three readers.2. One failing runtime aborts
oar installation,modelsandusage. These commands,skills/mcps/tools, and the MCPruntimestool gathered runtimes with a barePromise.all. One runtime whose installation probe rejects (a stuck--version, the Windows case behind #57/#155) or whose usage read rejects (offline) took the whole command down: no JSON for any runtime, an uncaught stack trace, exit 1.oar upgradeandoar login --statusalready report such a runtime as{ runtimeId, error }. The others now do the same through one helper (packages/cli/src/each-runtime.ts), and exit 1 when any runtime failed. In the MCPruntimestool the row is{ runtime, installation: "unknown", error }.Fix 1 alone would make more
oar usageruns crash, so the two go together.Evidence
Built package, fake executables that hang, caller
timeoutMs: 2000:unsupported/unsupported_installationafter 15014 msFailed to run … --help: … timeout after 2000 msafter 2010 msunsupported/auth_configuration_unavailableafter 2010 msFailed to run … provider list --json: … timeout after 2000 msCLI with
OAR_GROK_BINpointing at an executable that hangs:oar installationerroroar modelsgrok: error: …oar upgrade --check --json(control)errorHTTPS_PROXY=http://127.0.0.1:9 oar usageon main: exit 1, no stdout (Failed to read Grok account usage).Tests
tests/claude-account-usage-reader.test.ts: a timed-out help probe rejects and is not cached; an exit code still answers unsupported, uncached; with the probe uncached, the whole read rejects withintimeoutMs.tests/grok/grok-account-usage-reader.test.ts: each request gets what is left oftimeoutMs; a spent budget rejects.tests/kimi/kimi-account-usage-reader.test.ts: a timed-outprovider listrejects; an exit code answersauth_configuration_unavailable.tests/cli-each-runtime.test.ts: one rejecting runtime is its ownerrorentry; the MCPruntimestool lists every runtime.pnpm run checkpasses (677 tests).Docs: packages/cli/README.md (failure entries and exit code), docs/spec/account-usage.md (
timeoutMsscope), claude.md and kimi.md (one clause each).🤖 Generated with Claude Code