fix(agy): suppress tool use and file links in print-mode summaries - #390
fix(agy): suppress tool use and file links in print-mode summaries#390mvance wants to merge 2 commits into
Conversation
Text-only agy calls (allowTools: false) currently leak the agent's own work-log narration and local file:// links into the returned summary, because --sandbox and the isolated temp cwd only contain filesystem side effects, not what the agent chooses to print. Append an explicit "no tools, text only" instruction to the prompt in that case so the printed response stays clean summary text. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Matt Vance <mvance@pobox.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 22, 2026, 10:08 AM ET / 14:08 UTC. ClawSweeper reviewWhat this changesThe PR appends no-tools and no-file-link guidance to text-only Antigravity CLI prompts, documents its best-effort nature, and tests both tool modes. Merge readinessKeep open for maintainer merge. Current main still sends the unmodified text-only prompt to Antigravity, while this PR adds the requested, explicitly best-effort steering and has focused tests plus a recorded live smoke result. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSummarize routes extracted text and user prompts through a selected CLI model provider, then returns that provider's stdout as the summary. The Antigravity runner builds the flowchart LR
A[Extracted text and user prompt] --> B[Model executor]
B --> C{Text-only call?}
C -->|Yes| D[Antigravity prompt preparation]
C -->|Attachment| E[Attachment working directory]
D --> F[Antigravity print command]
E --> F
F --> G[Returned summary text]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the scoped guidance with its explicit best-effort documentation, while retaining the existing sandbox, temporary working directory, and argv-limit protections. Do we have a high-confidence way to reproduce the issue? No independent current-main live reproduction was run; current main's raw Is this the best way to solve the issue? Yes. With no hard no-tools flag established for AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c78ac23b2fc8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Overview
Supercedes #360 (which was closed because the maintainer environment lacked an authenticated
agysession for live proof). Rebased onto currentmain(0.23.0).Text-only
agyCLI calls (allowTools: false) can leak the agent's work-log narration and localfile://links into the returned summary because--sandboxand the temporarycwdonly isolate filesystem side effects, not printed stdout narration.This change appends explicit prompt-level steering guidance ("do not use tools or create files, return only the final text response") to text-only prompts sent to
agy --print.Changes
allowToolsisfalseto prompt before callingagy --print.docs/cli.mddocumenting thatagytext-only prompt guidance is best-effort prompt steering.tests/llm.cli.agy.test.tsto assert instruction presence whenallowTools: falseand absence whenallowTools: true.Verification & Live Smoke Proof
pnpm -s buildandpnpm -s checkpass completely (610 tests passed, 43 skipped).agy 1.1.13):Command:
file://links, zero work-log narration sections.