Skip to content

fix(antigravity): discover each model effort menu from native catalog - #834

Merged
stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/agy-model-menus
Nov 16, 2026
Merged

stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/agy-model-menus

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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


Antigravity host forms omitted effort choices for every model except the default. Reported by xxchan. Read native model/effort combinations from the same session/new response to populate each canonical model's own menu, including Hydrogen xhigh and Pro low/high, without any additional request or model switch. Only the current model has a reported default effort.

Add optional ModelEntry.effortUnavailableReason for a menu that could not be determined. Preserve unknown or ambiguous native combination IDs as selectors with a short reason, without marking them disabled or copying another model's levels. A native bare model ID with no effort combinations leaves all effort fields absent; a model missing from the native catalog gets the unavailable reason. Update the contract, runtime documentation, package README and reproducible native evidence.

Validation: full local checks passed after rebase (4454 unit tests, 18 mock behavior cases); Antigravity 1.5.9 behavior 17 passed, 2 skipped; native model-discovery and saved composite-selector vendor cases passed together on 1.5.9 and minimum 1.5.0 after rebasing onto merged #827. All 7 and 5 respective menus match individually selected native controls, with zero provider requests. Listing took about 748 ms on Linux, adding zero ACP requests. Parsed settings remained equal; the report retains and corrects early byte/key-order comparison mistakes.

@stamp-build
stamp-build Bot force-pushed the agent/otter/agy-model-menus branch from 6d0e37b to a52fedd Compare November 16, 2026 12:06
@stamp-build
stamp-build Bot merged commit a96dbc1 into main Nov 16, 2026
42 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/agy-model-menus branch November 16, 2026 14:01
@stamp-build stamp-build Bot mentioned this pull request Nov 16, 2026
stamp-build Bot added a commit that referenced this pull request Nov 16, 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_10a4a47fa7e053a7bbe8cd1f051efe8a"><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 -->

A session no longer stays "running" forever after a late tool-call end, OAR refuses Codex queued input that Codex would park after an interrupted turn, Antigravity accepts saved model selectors from older catalogs, and DSH sessions take a name and denied tools. One behavior change for Antigravity hosts: an unknown model now fails with `ModelConfirmationError`.

## Status stays idle when a tool call ends after its turn (#838)
Codex reports the end of a background terminal command (an `exec_command` the model already read) as a root `item/completed` even after the turn completed. OAR records it as a `tool_call_ended`, as before, but `status()` used to read it as a new running turn, and nothing ever ended that turn. Hosts then saw the session as busy indefinitely: `deliver()` kept steering into no turn and the host waited for a turn end that never came. Now, on every runtime, an idle session stays idle on `tool_call_ended`, and a tool end no longer counts as native activity for a pending prompt. A running session is unchanged, and other events still adopt a turn the stream did not open.

## Codex: queue after an interrupted turn is refused (#839)
After a normally completed turn, Codex 0.169.0 starts queued input by itself. After an interrupted turn it accepts `thread/queue/add` but leaves the input parked until a later prompt finishes. OAR's `queue()` now refuses that case with `no_active_turn` and a reason telling the host to use `prompt`, until a new root turn starts; it was accepted before. If a stale `status()` still says running, `deliver()` tries steer and then queue, and now reports that refusal as a rejected delivery instead of `queued`; an idle session is prompted as before. Child-thread interruptions do not affect the root queue.

## Antigravity: effort menus per model and saved composite selectors (#834, #827)
Older Antigravity catalogs listed selectors such as `gemini-3.8-flash-high`; agy 1.5.9 lists the model and `thought_level` separately, so restoring such a saved selector failed. OAR now splits a legacy composite selector into one unambiguous native model and that model's own effort level, and confirms both. A conflicting explicit `effort` throws `UnsupportedOptionError`. Exact native selectors are unchanged.

`listModels()` now gives every Antigravity model its own effort menu (#834), read from the same `session/new` answer with no extra request: before, only the default model had one. Only the current model has a default effort. New optional `ModelEntry.effortUnavailableReason` says when a model's menu could not be determined; a native combination OAR cannot attribute stays a selector with a short reason, without another model's levels.

**Behavior change:** opening an Antigravity session with a model that is not in the native catalog now throws `ModelConfirmationError` (with `catalogSelectorIds`) before agy is asked, instead of `RuntimeFailureError` with `failure: "model_unavailable"`. The same error is thrown for an ambiguous composite selector, or when the target model's menu lacks the requested effort. A host that branches on `model_unavailable` for Antigravity needs to handle `ModelConfirmationError` too. Antigravity's model-mismatch message now ends with the native thought level, for example `(native thought_level=medium)`.

## DSH: session names and tool denial (#837)
DSH sessions now accept `name` and `disallowedTools` instead of refusing them. The name is set through DSH's own session titles after every opening check passes, so a refused open never renames a saved session, and a resume keeps a title the session already has. Denied tools are removed from what the model is offered, and a forged call to one fails natively; an unknown or reserved tool name, or a conflict with a native creation hook, refuses the open. Supply `disallowedTools` again on every resume. Tool denial is not an operating-system sandbox and does not restrict DSH's own child agents.

## ACP: `initialize` gets its own 60-second deadline (#843)
Every ACP runtime (Antigravity, CodeBuddy, Devin, Grok, Kimi, OpenCode) now waits up to 60 seconds for `initialize`, separately from the 15-second default for other requests (30 seconds where a runtime already set it). A first start in a fresh home can be slow: Grok 1.0.70 on an idle Windows runner took 8 to 12 seconds to answer, close to the old limit. A timeout is still a typed `AcpError` naming the phase and the wait.

## Also
- Windows Grok startup diagnostic, manual-only (#841).
- Codex evidence for shared app-servers (#823, #828): native 0.169.0 admission conditions are met on Linux and macOS (Windows remains unproven), and thread-level environment and credential boundaries were measured on Linux. Production sharing is not enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Cindy <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 16, 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_4f1892a8b85a91e4691564c66e1ea34e"><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 -->

Remove the `usability()` readiness projection and its
`RuntimeUsability`, `UsabilityOptions` and `UnusableReason` types. Hosts
interpret installation, account and quota facts using their own
freshness and scheduling policy. Existing imports of these removed
exports must migrate to host-owned decisions over the returned probes.

Retain `orient()`, all orientation snapshot types, its readers and
tests, native evidence, and the orientation spec. Airwing confirmed that
it depends on the aggregate's total time budget, local/account/models
depths and separate skipped, timed-out and unsupported outcomes. The
design decision records this concrete consumer requirement; installation
version floors and the remaining discovery contracts stay where they
are. The roadmap moves the shipped orientation capability into its
foundation list.

Validation: full local checks passed after rebasing onto merged #834 and
#841 at `25efc6db` (4,443 unit tests and 18 mock behavior cases),
including the retained orientation depth, deadline, cancellation and
missing-evidence tests. Both packages built. Built root, observe and
browser exports no longer expose `usability` or its three types; root
`orient()` and the public orientation types remain. The orientation
implementation, tests and historical experiment directory match main
without changes.

Breaking change requested by xxchan and scoped with Cindy. This PR
removes only the readiness policy. Rebased after #834 merged; the
readiness-removal patch is identical to the previously approved version,
and the new per-model effort-menu contract remains in the orientation
spec.

Co-authored-by: Otter <[email protected]>
stamp-build Bot pushed a commit that referenced this pull request Nov 17, 2026
stamp-build Bot added a commit that referenced this pull request Nov 17, 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_6dfc1e9e058a7568c27403cd76615531"><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 -->

Adds an acceptance rule to "How to add a new runtime": any value that can differ between models (effort menu, default effort, context window, image input) is checked for every model `listModels` returns, against what the runtime reports after that model is selected.

Why: Antigravity's first adapter read only the current model's effort menu, so every other model showed no effort choice until #834. Testing the default model alone hid it (xxchan in #oar-raft, 2026-11-17).

Docs only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Cindy <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 17, 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_64db4399b71fc78e6415ea2e1db2e3cd"><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 -->

#834 measured a synthetic Gemini provider whose catalog includes
model/effort combinations. A reported signed-in Antigravity 1.5.10
catalog omits the non-default combinations, so that evidence does not
establish complete account menus.

Add a no-prompt probe with two controls. First compare session
creation/close against selecting every canonical model and restoring the
original model and effort before close. Record returned menus, current
values, request durations, parsed configuration changes and whole-root
file metadata changes. Then leave a different model selected, close, and
read a fresh process's defaults. If those defaults differ or cannot be
observed, restore the original selection through another native session
and verify it in one more fresh process. Persistence and restoration are
reported separately.

Account values, diagnostics, session IDs and absolute paths are excluded
from output. File inventory is metadata only, reports incomplete scans,
and distinguishes per-session log names from new path categories.
Unknown data remains unknown; the probe never rewrites credentials or
configuration files itself. Correct the runtime and experiment
documentation to qualify #834's provider, version and measured files.
Production listing still awaits the signed-in persistence result.

Run on the selected account:
```sh
OAR_TEST=antigravity pnpm tsx experiments/antigravity-model-menus/real-account.ts /absolute/path/to/agy output.json /absolute/workspace
```

Validation: `CI=1 pnpm run check` and 15 focused regressions covering
baseline ordering/failure, distinct menus, restoration and rejected
readback, volatile/persisted defaults, private configuration handling,
whole-root changes, incomplete scans and malformed protocol frames.
Native 1.5.10 with an isolated Gemini provider used four sessions and 22
ACP requests with zero provider requests. Its fresh process returned the
original model and effort after the leave-selected control. Both runs
wrote conversation state and logs; no additional path category appeared
only in the switched run. These local controls do not establish
signed-in account behavior. Reproducible selected evidence is included.

---------

Co-authored-by: Otter <[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.

0 participants