Skip to content

Release 0.3.0: native tool rows, provider worker types, plan-mode enforcement, and E2E tests - #41

Merged
greenpolo merged 48 commits into
mainfrom
integrate/refactor
Sep 28, 2026
Merged

greenpolo merged 48 commits into
mainfrom
integrate/refactor

Conversation

@greenpolo

@greenpolo greenpolo commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Releases 0.3.0. This merges the native-rows refactor with the new end-to-end test suite and the plan-mode audit fixes. See the 0.3.0 section of CHANGELOG.md for details.

Refactor

  • Draw Cursor, Antigravity, and Grok actions as Claude Code draws its own tools; stop drawing unconfirmed native actions as successes
  • One worker type per provider (model picked through the Agent model parameter) replaces one worker per model and effort
  • Native harness workers run with isolation: "worktree" and survive Claude-loop snapshots; live context is reported separately from turn usage

Permissions and plan mode

  • OpenAI automatic review enforces plan mode, including plan mode entered or left mid-turn
  • A planning parent keeps every native worker in plan; unknown worker permissions fail closed
  • Antigravity plan mode allows only read-only native tools
  • Grok settings are admitted with Grok's own rules
  • Subscription auto mode stays free after non-Claude replies (the gateway returns server-side safeguard results)

Other

  • Claude responses are no longer cut at three minutes
  • Tool definitions are deferred the way Claude Code does natively (ENABLE_TOOL_SEARCH=true)
  • Zen models that no longer serve requests are dropped
  • New hermetic E2E suite (npm run test:e2e) with a real claude binary, fake upstreams, and fake native CLIs; CI runs it on Linux, macOS, and Windows

Verification

  • CI green on Linux, macOS, and Windows: npm run check plus the hermetic E2E suite with a real claude binary
  • The first CI E2E run found a Windows bug that is also on main: claude.cmd launched through cmd.exe dropped empty arguments such as --setting-sources "". It is fixed with a unit test and a CHANGELOG entry. The same run found two test-only issues: a 50 ms deadline race under load, and macOS /private/var workspace paths
  • Local (Linux): npm run check 567 pass, npm run test:e2e 106 pass, npm run test:mod 70 pass (run before the Windows fix, which doesn't touch the Mods hooks), no DEP0190

🤖 Generated with Claude Code

https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD

greenpolo and others added 30 commits September 23, 2026 14:01
Cover routing across all providers, streamed tool memory, exchange eviction and capacity, lock and install path validation, authenticated mod routes, and OpenAI reviewer failure and ownership.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Bind worktree starts to their acknowledged parent spawn, retain admitted restrictions across Claude-loop snapshots, and report why a worker start was refused. Cover Windows paths, unrelated directories, policy retention, and session cleanup.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Build worker catalogs from picker rows, validate model ownership and effort naming at spawn, and label worker rows and notifications with the resolved provider and model. Update provider defaults, launcher behavior, live fixtures, documentation, and regression tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Track Cursor, Antigravity, and Grok actions under native tool names, render bounded inputs and results through authenticated Mods hooks, and keep display tools out of model requests. Preserve deferred final answers across restarts, enforce session ownership, and mark unfinished actions as unconfirmed. Include captured fixtures, rendering tests, gateway tests, and integration documentation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ering

Use the last reported model call for Antigravity and Grok context while retaining total consumption and model-call counts for receipts. Preserve context through display follow-ups, show context and consumption together, and restore receipt pane messages. Include usage fixtures, accounting tests, and provider documentation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add the hook TypeScript configuration and timer globals, run type checking before hook tests, ignore generated engine declarations, and document regeneration with /plugin-types.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntials

Keep upstream interception confined to an explicit test preload and block proxy-visible external traffic while asserting tool execution and the Mod startup acknowledgment.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…outing

Keep fake HTTP and native executable seams entirely in the explicit test loader, with bounded child cleanup and real Claude permission-mode selection.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…ivers

Assert byte-preserving Claude passthrough, explicit deadlines, Responses and Zen protocols, real permission modes, and Antigravity continuation through SendMessage. Add credential-aware live skips and a POSIX TTY interface without changing production routing.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Adds npm run test:e2e, a CI job that installs Claude Code 2.1.283 on
Linux, macOS and Windows, Knip entries for E2E tests, and ignores the
generated .claude/types declarations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o end

Cover settings and version admission, terminal cancellation, bounded streams, and two-turn context with credential-gated live plans.

Co-Authored-By: Claude Code <noreply@anthropic.com>
… end to end

Add bounded live plans for direct-provider workers and hermetic coverage of registered catalogs, saved-session reasoning isolation, and upstream failures without changing shared harness or production code.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Exercise Cursor eviction accounting and Grok tagged requests and quota through the real launcher and authenticated gateway. Add a no-inference live matrix with Cursor/Grok credential isolation and an explicit Antigravity credential-export gap.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep representative picker paths and one worker spawn per provider instead of enumerating catalogs. Resolve workers from Claude's advertised registrations and pass explicit model overrides for per-provider worker definitions.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace the unreachable duplicate-dispatch TODO with passing checks for visible 400 refusals on identical tagged requests. Keep Cursor eviction and Grok quota regressions as TODOs.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Exercise isolated native providers through real Claude turns and preserve failing Antigravity contracts as TODO regressions, with bounded live plans and scenario-local transport drivers.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…rness

Cover OpenAI main and worker permission modes, native plan policy and text rows, and tmux approval decisions. Preserve the current classifier incompatibility as a running reviewer TODO, with bounded live plans for permission scenarios.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…enarios

A SendMessage sent while a background worker is still running is only queued for
its next tool round, so the resume scenarios passed or failed on timing. Waiting for
the completion notification exposes that main revokes a finished native worker after
a later Claude prompt; those scenarios are todo on main (fixed on the refactor by
34ffc9a). Also tolerate a 50 ms deadline expiring before the fake provider sees the
request, and report the interrupt transcript when it is classified as success.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.gitignore
#	package.json
Scenarios hardcoded main's per-model worker names, so they could not run against
the per-provider layout (multi-<provider> plus an Agent model parameter). Share one
resolver that reads the registration reminder Claude sends and picks the worker for
either layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fake agy/grok/codex .cmd files now use npm's shim shape, so the gateway
runs them through Node directly as it does the real agy.exe. A plain .cmd went
through cmd.exe, where %* stops at a prompt's first newline. Also pass the
preload as a file URL and accept Claude's aborted_streaming interrupt result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
greenpolo and others added 16 commits September 26, 2026 16:17
Every route's usage translation now reaches Claude's result and modelUsage
exactly; native workers fall back to marked estimates; /context follows
reported usage without upstream count_tokens; Gemini rows get the 1M window;
reported usage near the window triggers auto-compaction.

The first live run exposed test-side faults: a retired Zen model, a budget
below Claude's own cost estimate, fake Cursor catalog extras leaking into
live runs, a fixed 30 s restart kill, and a hermetic-only tool_result check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	test/e2e/native-provider-workers.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zen still lists deepseek-v4-pro and kimi-k2.7-code but answers 404, and
its free-tier models refuse use outside OpenCode. DeepSeek V4.1 Flash
becomes the first Zen default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	test/unit/native-launcher.test.ts
#	test/unit/native-zen-models.test.ts
Claude Code only defaults Opus to its 1M window when ANTHROPIC_BASE_URL is
unset or first party, so sessions under Multi compacted at 200k. Claim first
party when signed in to Anthropic; the gateway forwards Claude traffic
unchanged to api.anthropic.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
Claude asks its auto-mode classifier about Bash in plan mode when plan was
entered from auto. For OpenAI sessions the gateway answered with the OpenAI
reviewer, which had no plan-mode input and approved a file write live.
Review now reads the session's admitted mode: planned edits are denied
outright and the reviewer gets a mandatory read-only restriction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
agy's --mode plan only steers its model; under --dangerously-skip-permissions
it ran run_command and write_to_file live. The deny list also missed browser,
schedule and messaging tools. Plan and compaction now use a hook allowlist
that denies unknown tools; the hook's deny path was verified live with agy
1.2.12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
A planning parent now keeps every worker in plan, including a native worker
spawned in auto and resumed later, and a worker definition's own mode no
longer overrides it. Spawn admission stores only an explicit worker mode.
OpenAI review also reads the mode Claude reports with each pending action,
so EnterPlanMode and ExitPlanMode inside a turn apply, and an unknown worker
mode fails review closed. Grok settings admission uses Grok's validator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL also switches Claude to its
server-side auto-mode classifier. Translated OpenAI and Zen requests cannot
carry that request, and hermetic plan-mode runs denied the Agent call with
'server_not_requested'. The Opus 1M check stays as a todo until the window
can be restored without first-party behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
In auto mode Claude asks the API for safeguard_results on every request and,
when a reply lacks them, switches the whole session to billed local
classifier requests. Gateway-served OpenAI, Zen, Cursor, Antigravity and
Grok replies never carried them, so one non-Claude turn made the rest of a
subscription session's checks billed.

The gateway now returns results whenever the request asked for them:
OpenAI tool uses are unavailable, so Claude falls back for that call to the
OpenAI reviewer; Zen is unreviewed outside plan and refused in plan or an
unknown mode; native display rows are not flagged. The request's own
classifier mode also binds OpenAI plan-mode review. Verified live on a Max
subscription with OpenAI, Cursor and Zen workers and a Zen plan-mode run.

Implemented by GPT-6 Sol from a coordinator brief.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
Claude Code turns tool search off for a non-Anthropic base URL, so the
launcher opts back in. It used ENABLE_TOOL_SEARCH=auto, which loads every
deferrable tool up front while they fit in 10% of the window: with a 1M
window about 100k tokens of connector tools filled each session before the
first prompt (measured 113.6k vs 14.4k at startup). Use true, matching the
direct-connection default of always deferring. Explicit values are kept.

Hermetic scripts now load ExitPlanMode through ToolSearch, as a real model
must, and the gauge estimate skips deferred categories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
Copilot AI balanced review requested due to automatic review settings September 28, 2026 23:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

greenpolo and others added 2 commits September 28, 2026 19:11
A loaded gateway fired its 50 ms test deadline after the 400 ms fake reply
had finished, and macOS reported worker cwds through /private/var.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYKBwU9Cuxk6bKhp74AEFD
@greenpolo
greenpolo merged commit e50b0bd into main Sep 28, 2026
12 checks passed
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.

2 participants