Skip to content

chore: release v0.59.1 - #373

Merged
xxchan merged 1 commit into
mainfrom
chore/release-0.59.1
Oct 12, 2026
Merged

xxchan merged 1 commit into
mainfrom
chore/release-0.59.1

Conversation

@xxchan

@xxchan xxchan commented Oct 12, 2026

Copy link
Copy Markdown
Member

Release OAR and CLI 0.59.1. This PR changes only the two package version fields.

Fixed: invalid session names are an UnsupportedOptionError (#372)

  • A blank SessionOptions.name, or one with a NUL character, now rejects with UnsupportedOptionError on name before anything starts, as invalid additionalDirectories already do. This applies on claude, codex and pi, the runtimes that take a name.
  • In 0.59.0 a blank name threw a plain Error, which a host catching by type missed. A name with a NUL reached claude's command line and failed in Node's spawn.

Behavior change

  • A blank name's error is now UnsupportedOptionError instead of a plain Error.

Validation: #372 passed all 17 checks on its final head, and its merged tree equals its CI tree. Found by Lookout's daily inspection of 0.59.0. After this PR passes CI and merges, tag its exact squash commit as v0.59.1 to trigger npm trusted publishing.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit bb98cbc into main Oct 12, 2026
17 checks passed
@xxchan
xxchan deleted the chore/release-0.59.1 branch October 12, 2026 10:56
stamp-build Bot added a commit that referenced this pull request Nov 20, 2026
…sAt (#1068)

<!-- 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>opened from existing branch
<code>agent/lookout/antigravity-midturn-quota</code> @
<code>e15e9e6fd2ba</code>, which the agent did not push</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_079bd7ce2960e5bdc9581d2c6bea4ff1"><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 -->

## Summary

Classify Antigravity (`agy`) individual-quota notices that arrive
mid-turn after earlier tool work as `{ kind: "failed", failure: "quota",
reason, resetsAt }` instead of `completed`, while preserving earlier
whole-turn token spend and keeping normal model text that quotes or
echoes the notice classified as `completed`.

Fixes the class reported in `#core:#373`.

## Measured Distinguishing Signal

Inspected all 42 recorded turns with assistant text across 18 Harbor
`agy 1.5.12`/`1.5.13` voyages (2026-11-19) and ran local loopback Gemini
provider controls against `agy 1.5.13` (no real quota spent):

1. **Recorded Harbor voyages (42 turns: 37 normal + 5 real quota
hits):**
- **37 / 37 normal turns** emitted a trailing `usage_update` frame after
the final `agent_message_chunk` (including after native context
compaction), right before `session/prompt`.
- **5 / 5 real quota turns** (1 turn-start without `usage`, 3 mid-turn
after tool work with prior `usage` on `session/prompt`, and 1 mid-turn
after a superseded `steer` + tools without `usage` on the final
`session/prompt`) emitted `"\n⚠ Individual quota reached. Please upgrade
your subscription to increase your limits. Resets in <countdown>.\n"` as
the entire assistant text after the last tool call / `session/prompt`,
with **no** `agent_thought_chunk` in that final step and **no**
`usage_update` after the notice.
2. **Local `agy 1.5.13` loopback controls (`GOOGLE_GEMINI_BASE_URL` on
`127.0.0.1`):**
- Model echoes exact notice directly (`echo-direct`): emits trailing
`usage_update` after `agent_message_chunk` and `usage` on
`session/prompt`.
- Model thinks then echoes exact notice (`echo-with-thought`): emits
`agent_thought_chunk`, `agent_message_chunk`, trailing `usage_update`,
and `usage` on `session/prompt`.
- Model runs `mcp_echo_echo`, then echoes exact notice with growing
`totalTokenCount` (`108 -> 158`, `echo-after-tool-growing-usage`): emits
trailing `usage_update` (`used: 158`) after `agent_message_chunk`.
- **Known wire-level boundary (`echo-after-tool-same-usage`):** `agy`
deduplicates `usage_update` when `totalTokenCount` is unchanged (`108 ->
108`). A synthetic model reply after a tool call that emits zero thought
chunks, outputs the exact `\n⚠ ...\n` boilerplate with no other
characters, and returns the exact same context token count as the
previous step produces identical ACP frames and cannot be distinguished
on the wire. Documented explicitly in `docs/runtimes/antigravity.md`.

## Changes

- `packages/oar/src/runtimes/antigravity/quota.ts`:
- Evaluate the trailing assistant text segment after the last
`tool_call` / `tool_call_update` / superseded `session/prompt` in the
root turn.
- Reject when any `usage_update` arrives after the notice text, when any
`agent_thought_chunk` / `toApp` request / unknown frame appears in that
final step, or when no prior tool ran in the current prompt window and
`session/prompt` carries `usage`.
- Reset the prompt-usage window (`priorTool = false`) on a superseded
`session/prompt` frame so steer turns only allow `usage` on the final
prompt when tool work ran after the superseded prompt.
- `tests/acp/acp-antigravity-quota.test.ts`:
- Added recorded mid-turn quota tests (with prior `usage` verifying
earlier spend is still accumulated in `session.usage()` and
`session.contextUsage()`, after earlier assistant text + tool call, and
without `usage` after steer + tool call).
- Added mid-turn model-echo negative controls (trailing `usage_update`,
final-step `agent_thought_chunk`, surrounding text, notice followed by a
tool call, and echoed notice with `usage` after a superseded
`session/prompt`).
- `docs/runtimes/antigravity.md`:
- Updated the quota-notice section and Failures table with mid-turn
behavior, measured frame signals, earlier-spend preservation, and the
same-context-count wire boundary.

## Call-Site Audit

Grepped all references to `antigravityQuotaNotice`,
`antigravityQuotaError`, and `promptOutcome`:

- **Changed:** `packages/oar/src/runtimes/antigravity/quota.ts`
(`antigravityQuotaNotice`, invoked via
`antigravityAcpProfile.promptOutcome` in
`packages/oar/src/runtimes/antigravity/session.ts:44`).
- **Unchanged (verified):**
- `packages/oar/src/shared/acp/turns.ts:146-154`: passes
`rootTurnRecords` to `profile.promptOutcome` and still emits
`frame.context` (`promptUsage(result)`) alongside a failed `turn_ended`
outcome, so earlier mid-turn spend is preserved automatically.
- `packages/oar/src/runtimes/antigravity/quota.ts`
(`antigravityQuotaError`): handles RPC error envelopes
(`session/prompt/error`), unaffected by mid-turn `end_turn` notices.
- `packages/oar/src/runtimes/codebuddy/session.ts:19`
(`codebuddyPromptOutcome`): classifies native
`_meta["codebuddy.ai/errorMessage"]` / `refusal`, unrelated.
- `packages/oar/src/runtimes/grok/session.ts:190` (`grokPromptOutcome`):
classifies structured-output refusal, unrelated.

## Verification

- Replayed `antigravityQuotaNotice` against all 42 recorded Harbor
turns: `5/5` real quota turns classified as `failed: quota` with
`resetsAt`, `37/37` normal turns returned `null` (`completed`), and `0`
superseded `session/prompt` frames matched.
- Ran `CI=1 pnpm run check` locally (typecheck, oxlint, full vitest
suite, and mock sea-trial suite).

Co-authored-by: Lookout <[email protected]>
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.

1 participant