Skip to content

test(codex): verify host tool annotations under read-only policy - #641

Merged
stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/codex-tool-annotations-regression
Nov 5, 2026
Merged

stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/codex-tool-annotations-regression

Conversation

@stamp-build

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

Copy link
Copy Markdown
Contributor

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


Codex's handling of host tool annotations was covered only by an older manual probe. This adds native vendor regressions under approvalPolicy: never: an unannotated host tool is refused in a read-only session, a readOnlyHint: true tool actually runs and returns its result to the model, and a subsequent native apply_patch write is still refused.

A second session sends the identical calls with full access and verifies both handlers run and the file is written. Both cases assert the native policy readback, tool outcomes, provider-visible results and filesystem effects. The runtime matrix links the regression and preserves the original versioned observation. Product code, CI configuration and timeouts are unchanged.

Validation: Codex 0.166.0 on Linux with a scripted local provider, no login or model quota. Both new cases and three existing MCP/approval cases pass. Removing annotation forwarding makes both new cases fail. CI=1 pnpm run check passes (3,236 unit tests and 18 mock behaviors). Both new cases also passed on Windows in the first CI attempt. That job failed only because the existing input-dropped.vendor test exceeded its 60-second limit; the same test passed on the unchanged base Windows run and in an isolated Linux run. The failure log and artifacts are retained, but contain no per-stage trace for that case, so the cause is not established. The single Windows Codex job rerun passed on the unchanged head. All 36 CI checks now pass, including the native regressions on Linux, macOS and Windows. The retained first-attempt failure remains unexplained; the rerun is not evidence of a causal fix.

Raft task 146, following merged PR #593.

@stamp-build
stamp-build Bot merged commit 11b6b97 into main Nov 5, 2026
72 of 73 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/codex-tool-annotations-regression branch November 5, 2026 17:16
@stamp-build stamp-build Bot mentioned this pull request Nov 5, 2026
stamp-build Bot added a commit that referenced this pull request Nov 5, 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_62138ffbcbca4522b115265aa4095fac"><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 moves to its official `agy acp` entrypoint (breaking), and this release adds the DSH runtime, bounded record retention, opt-in cleanup of an aborted Codex turn's processes, and automatic answers to Codex's runtime requests.

## Breaking: Antigravity uses native `agy acp` (#622)
- The public runtime id stays `antigravity`. It now runs `agy acp --dangerously-skip-permissions --process-per-session` instead of the separate `agy_acp_server`.
- **Hosts must install stable agy CLI 1.5.0 or newer** and replace any old server override.
- Non-empty `disallowedTools` is now refused, because the native CLI ignores the old filter. MCP tool-list changes are now `none`.
- Model, effort, append and MCP settings must be passed again on resume.
- Credential-bearing MCP entries and extra directories stay refused. Login stays absent under the vendor's account policy; use provider API keys.
- Sessions and history from the old server are not migrated, so old session ids do not resume.
- **Also affects Kimi and OpenCode:** the shared resume check now refuses before resuming, with `UnsupportedOptionError("cwd")`, when it cannot confirm the saved directory. Absence from the session list no longer reports `SessionNotFoundError`.
- Thanks to M4n5ter, who identified the entrypoint and contributed the earlier #620. That report's real-account session was not independently reproduced; this PR's validation used isolated local providers.

## New runtime: DSH (DeepSeek Harness) (#634)
- One owned `dsh` process per session, through a small private bridge plugin. OAR does not change the user's configuration and only generates a private patch; DSH itself still creates its profile and writes logs and caches.
- Version floor `0.2.1-rc.5`, plus a method inventory: a missing native method makes its control absent or refused.
- Supported: open, resume, prompt, steer, queue and withdraw, abort, dispose, model and effort with read-back, usage, child attribution, `listModels`.
- Refused until probed: `systemPrompt`, `appendSystemPrompt`, `mcpServers`, `disallowedTools`, `launchArgs`, `serviceTier`, `additionalDirectories`, `outputSchema`, `name`, `userConfiguration: "exclude"`, `goals`, `endTurnProcessesOnAbort`, images. Login, auth status and account usage are absent.
- Verified with loopback providers, and with a real DeepSeek key on Linux (0.2.2-rc.1, 0.2.1-rc.5). First-party plans are not verified. Platform coverage is in `docs/runtimes/dsh.md`.

## Bounded record retention (#630)
- Opt-in `SessionOptions.retainedBytes`. Omitted, nothing changes.
- Past the limit, the oldest frames lose `native` (now `null`) and their events' tool input and output, and carry `elided: true`. `seq`, frame types, event kinds, usage and text stay, so `status()` and `usage()` are unchanged.
- Observers receive every record complete first. A host wanting full history persists it.
- The record count and text are not bounded. Tool parts built from trimmed frames carry `elided: true`.

## Codex: end an aborted turn's processes (#633)
- Opt-in `SessionOptions.endTurnProcessesOnAbort`. After a turn started by OAR's `prompt()` with a usable baseline reports `interrupted`, OAR ends the processes that turn started, with a start-identity check before any signal. Inputs drained from the queue, goal continuations and compaction are out of scope.
- The app-server, its helpers, stdio MCP servers and earlier background commands survive.
- A fast command caught in the baseline, one started after the snapshot, or a process that already left the tree can survive.
- It would rather not kill than kill wrongly: if a process-table read fails or is unfinished, nothing is ended and the reason is recorded in a `cleanup` response, which comes after the turn's end. On Windows nothing is ended. Refused with shared placement and on every other runtime.
- `SessionCleanup` `completed` and `failed` gain optional `signalled`: kills actually sent, not proof of exit.

## Codex: runtime requests are answered (#629)
- A request Codex sent the client during a turn (approval, user input, MCP elicitation, dynamic tool call) was recorded and never answered, so the turn hung. OAR now records it, answers at once with a native refusal, or `-32601` for anything else, and records the answer.
- **Host-visible:** `app_answered` now follows `app_request`, and `app_request_cancelled` no longer appears on Codex.

## Host tool annotations (#593)
- `HostTool.annotations` (`title`, `readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) reach `tools/list` unchanged. OAR neither validates nor acts on them. Credit: Richard Chien (stdrc). A native Codex regression pins the observed behaviour (#641).

## Kimi account usage (#637)
- Unreadable or invalid quota responses now reject with a safe reason instead of reporting `available`, empty windows or 0% used. Damaged windows are omitted and valid ones kept.
- Only a missing file means `credentials_missing`; other credential read failures reject. Fixes #635 and #636.

## Evidence and tests
- Native evidence refreshed and CodeBuddy pinned to 2.179.3 (#619). A Windows directory removal retry in a Codex test (#639).

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

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