Skip to content

fix(antigravity): keep navigation Escape from marking work interrupted - #21636

Merged
nwparker merged 2 commits into
nwparker/agy-hook-execfrom
nwparker/agy-escape-navigation
Sep 21, 2026
Merged

nwparker merged 2 commits into
nwparker/agy-hook-execfrom
nwparker/agy-escape-navigation

Conversation

@nwparker

@nwparker nwparker commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​35
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

ELI5

Closing Antigravity's usage panel does not mean its work stopped. Orca was treating the Escape key as a cancellation and briefly showing “Interrupted by user.” It now waits for stronger evidence instead of guessing from that key.

What Changed

Antigravity joins the existing shared policy for agents whose Escape key also closes dialogs. The renderer skips the interruption request, and the execution host rejects direct or delayed Escape requests too. Ctrl+C and provider completion events retain their existing behavior. This covers local and remote status processing without a wire change or another status store.

Why

The installed agy 1.2.7 TUI labels Escape as “Close” in /usage; pressing it returns to the composer. The key alone cannot distinguish navigation from cancellation. Reusing the existing policy avoids fragile screen-text matching and keeps the host authoritative.

Linked Issue

Addresses #20828. Stacked on #21635; only the Escape policy and regressions are new here. Kept draft pending a real authenticated working-turn check.

Visual Proof

Installed agy in a hidden Orca terminal, before and after pressing Escape:

Usage panel open After Escape
Usage panel Composer restored

These screenshots verify agy's navigation behavior, not the corrected sidebar during a successful running turn. That turn is blocked by generation HTTP 401 ACCESS_TOKEN_TYPE_UNSUPPORTED. The CLI remained usable for /usage; no authentication changes were made. A separate raw 127×40 PTY capture also records /usage, esc Close, and return to the composer.

Testing

  • I manually tested the installed agy's Escape behavior locally
  • Automated tests added/updated

macOS: four new regressions fail before the policy change; all 63 renderer/host tests pass afterward. Coverage includes single/repeated Escape, a later Stop event, Ctrl+C, and retaining a pending Ctrl+C when Escape follows it. Host tests inject Antigravity hook events, including through the remote-ingestion path; they do not claim a live remote agent run.

Full pnpm tc, changed-code quality, and pre-commit checks pass. Full app build, real Linux/SSH/Windows execution, and a rendered working-turn before/after remain pending.

Review

A genuine cancellation using Escape now relies on provider completion/status evidence rather than the key alone; if the provider misses that evidence, the row can remain working until another authoritative update. This is the same tradeoff used for the other agents with ambiguous Escape navigation. No permissions, shortcut bindings, layouts, or wire fields change.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Checklist

  • Small, focused change; ELI5, mechanism, alternatives, and risks explained
  • Installed-CLI navigation evidence attached
  • Self-reviewed for correctness, security, performance, platform and SSH impact
  • Full build and authenticated end-to-end validation

@nwparker

Copy link
Copy Markdown
Contributor Author

Independent verification update:

  • Installed agy 1.2.7 returned the exact sentinel AGY_ESCAPE_POLICY_LIVE_OK.
  • Escape-navigation regression suites: 63 passed.
  • pnpm tc:node and pnpm tc:web passed.
  • Changed-code quality passed with 0 new findings.
  • Replacement CI run 35434509434 passed typecheck, static analysis, all 8 test shards, managed hooks, verify, and both packages.

Scoped verdict: Approve after CI for preventing Antigravity navigation Escape from being treated as interruption. The PR’s hidden agy /usage before/after proof is valid; authenticated working-turn status and Linux/SSH/Windows live execution remain unverified.

@nwparker

Copy link
Copy Markdown
Contributor Author

Independent verification (2026-09-20):

  • Escape/navigation inference tests: 63/63 passed.
  • pnpm tc:node and pnpm tc:web passed.
  • pnpm run check:code-quality:changed origin/main passed with 0 new findings across 40 changed files.
  • Installed agy 1.2.7 authenticated exact sentinel returned AGY_ESCAPE_OK.
  • Full CI 35434509434 is green across test shards, typecheck, static analysis, managed hooks, and macOS/Windows packages; the PR includes hidden /usage visual proof.

Verdict: approve after CI for the navigation Escape policy. Authenticated working-turn status and live Linux/SSH/Windows execution remain separate gaps. No merge performed.

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh live TUI probe with installed agy (macOS, API-key process environment):

  • Started agy --prompt-interactive ... --sandbox in a PTY.
  • Sent /usage, then Escape.
  • Sanitized transcript checks saw the Antigravity header and usage dialog markers before Escape.
  • After Escape, usage/close markers disappeared and the composer shortcut footer (for shortcuts) returned.
  • Probe completed without timeout; no raw transcript, prompt text, paths, or credentials were published.

This directly verifies the behavior behind #20828/#21636 on the installed CLI. It is still local macOS PTY evidence, not a Linux or Windows Orca-rendered run.

@nwparker

Copy link
Copy Markdown
Contributor Author

Fresh CI rerun: green.

ELI5: pressing Escape to navigate no longer tells Orca that agy work was interrupted. Tests and CI are green; merge verdict: approve.

@nwparker
nwparker marked this pull request as ready for review September 21, 2026 03:58
@pullfrog

pullfrog Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit e0ac49e into nwparker/agy-hook-exec Sep 21, 2026
86 of 106 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.

1 participant