Repository navigation
fix(cli): agy commands run in containers, and agy replies render as one message - #1037
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two Antigravity defects from the owner's codespace (2026-11-24).
1. Commands fail in containers. agy's
automode 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 withagy acp+session/set_mode autoon a temp clone. Indefaultmode + allow, the samegit statusruns.agy acpadvertisesautoanyway;enableTerminalSandbox:falsedoesn't help;agy acphas no--settings.Fix:
agents/antigravity/terminal-sandbox.tsprobesunshare --user --map-root-user trueonce. Where it fails, the adapter'smodeSubstitutesrunsautoas agydefault, andAcpClient.modeAutoApprovesmakes the CLI approve through its own permission gate (internal-path guard and guardrails still run). The picker keeps showing Auto. A session agy restores inautois moved todefaultas well. Hosts where the sandbox works are unchanged.2. Replies render broken. agy sends
agent_message_chunkwithoutmessageId. 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.tsreplays the exact delta sequence from the log (fails on main, passes here). Newantigravity-mode-substitute.test.ts. Full CLI suite: 3652 passed.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.