Skip to content

fix(cli): agy commands run in containers, and agy replies render as one message - #1037

Merged
edgar-durand merged 2 commits into
mainfrom
fix/agy-sandbox-and-text-glue
Nov 24, 2026
Merged

edgar-durand merged 2 commits into
mainfrom
fix/agy-sandbox-and-text-glue

Conversation

@edgar-durand

@edgar-durand edgar-durand commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Two Antigravity defects from the owner's codespace (2026-11-24).

1. Commands fail in containers. agy's auto mode runs every command in its terminal sandbox (a user-namespace re-exec of agy). A container without unprivileged user namespaces refuses it: Command failed to run: fork/exec /usr/local/bin/agy: operation not permitted. Reproduced in the codespace with agy acp + session/set_mode auto on a temp clone. In default mode + allow, the same git status runs. agy acp advertises auto anyway; enableTerminalSandbox:false doesn't help; agy acp has no --settings.
Fix: agents/antigravity/terminal-sandbox.ts probes unshare --user --map-root-user true once. Where it fails, the adapter's modeSubstitutes runs auto as agy default, and AcpClient.modeAutoApproves makes the CLI approve through its own permission gate (internal-path guard and guardrails still run). The picker keeps showing Auto. A session agy restores in auto is moved to default as well. Hosts where the sandbox works are unchanged.

2. Replies render broken. agy sends agent_message_chunk without messageId. The mapper minted a UUID per chunk, so the runner read every chunk as a new message and added a paragraph break mid-word and inside inline code ("confirm" / "ados"). The API's bare-path heuristic then turned the orphaned path lines into "read" file cards. Now chunks without an id share one id (NO_MESSAGE_ID), and the tool call between two texts marks the message boundary. Claude/Codex (which send ids) behave as before.

Tests: textGlue.test.ts replays the exact delta sequence from the log (fails on main, passes here). New antigravity-mode-substitute.test.ts. Full CLI suite: 3652 passed.

🤖 Generated with Claude Code


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

edgar-ph and others added 2 commits November 23, 2026 21:40
…ne message

agy's auto mode runs every command in its terminal sandbox, a user-namespace
re-exec of agy that a container without user namespaces refuses (codespaces,
the Box): 'Command failed to run: fork/exec /usr/local/bin/agy: operation not
permitted'. Reproduced with agy acp + set_mode auto in a temp clone on the
owner's codespace; default mode + an allow runs the same command. Where
'unshare --user --map-root-user true' fails, the adapter now runs auto as agy
default and the CLI approves through its own permission gate (internal-path
guard, guardrails); a session agy restores in auto is moved too.

agy sends agent_message_chunk without messageId. The mapper minted a UUID per
chunk, the runner read each as a new message and inserted a paragraph break
mid-word and inside inline code ('confirm' / 'ados'), and the API lifted the
orphaned path lines into read file cards. Id-less chunks now share one id;
the tool call between two texts is their message boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edgar-durand
edgar-durand merged commit 79a7bad into main Nov 24, 2026
12 of 13 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