Repository navigation
Description
Scope
This tracks codev's consult integration with the agy CLI. The empty-output root cause is an open upstream agy bug (google-antigravity/antigravity-cli#76); codev cannot fix that directly, but it can work around it and stop misreporting it.
Root cause (upstream, not codev)
google-antigravity/antigravity-cli#76 — agy --print / -p silently drops stdout when stdout is not a TTY (pipe, redirect, subprocess): exit 0, no stderr, a full model round-trip but zero output. consult spawns agy with piped stdout (spawn(bin, args, { stdio: ['ignore', 'pipe', 'pipe'] }), consult/index.ts:814), so it hits this on every run, and the empty output is then treated as a non-blocking skip.
- Status: open (filed 2026-05-21), no maintainer fix.
- Reproduced here on agy 1.0.6 / macOS (the issue was first filed against 1.0.0 / Windows), so it is cross-platform and persists across versions.
- agy 1.0.6 has no
--output/--formatflag (only--log-file); issue Update projectlist: mark spec 0042 as committed #76 requests--output <path>,--format json, or unconditional stdout flush, none shipped yet.
Correction to the earlier hypothesis: --sandbox is not the cause. Every empty reproduction was piped / captured (non-TTY), which is #76, independent of --sandbox. (The separate browser/key popup some runs trigger is agy's re-auth flow, not the empty-output cause.)
Codev-ownable slice
- Misleading diagnosis. The skip message says "agy not authenticated / install the CLI" when the real cause is the non-TTY stdout drop and auth is fine. Fix
agySkipContentto name the likely cause (and link Update projectlist: mark spec 0042 as committed #76). - Silent degradation. A 3-way consult quietly becomes 2-way (Codex + Claude) with no loud signal (
consult/index.ts:858-874). Surface the dropped lane so it is not mistaken for a full 3-way. - Workaround (the only way to make the lane actually work before the upstream fix). Run agy under a pseudo-TTY so its stdout is a terminal (defeats the Update projectlist: mark spec 0042 as committed #76 drop), or adopt agy's
--output/--formatonce upstream ships it. Track Update projectlist: mark spec 0042 as committed #76 as the dependency.
Evidence
agy -p "say hi"→ real response (auth is fine).agy --print --sandbox "Reply with exactly: PONG"andagy --print "..."(no sandbox), both piped/captured → empty (~4-5s), reproduced on two machines (a builder worktree and the architect's main checkout).- Surfaced during scaffold: deliver framework files (protocol.md, templates, workflow-ref) via resolver-aware channels (fresh-install class fix) #1011's review consults: the Gemini lane skipped every time, cycling through "not authenticated", "timed out producing the review", "timed out (no response)", "produced no review output".
Upstream (not codev)
The real fix is google-antigravity/antigravity-cli#76. Not codev's to fix; codev tracks it and works around it. Related: google-antigravity/antigravity-cli#115, google-gemini/gemini-cli#27466.
References
packages/codev/src/commands/consult/index.ts:814(piped spawn),:803(--sandbox),:858-874(skip handling),:628-629(timeouts),agySkipContent(skip message).- Upstream: agy --print / -p silently drops stdout when run with a non-TTY (pipe, subprocess, redirect) google-antigravity/antigravity-cli#76
- Surfaced during scaffold: deliver framework files (protocol.md, templates, workflow-ref) via resolver-aware channels (fresh-install class fix) #1011 review consults (iter-1 + iter-2). agy version: 1.0.6.
Activity
[-]consult: Gemini lane (agy) silently skips — `agy --print --sandbox` produces no output[/-][+]consult: harden the agy integration — Gemini lane silently and misleadingly drops out[/+][-]consult: harden the agy integration — Gemini lane silently and misleadingly drops out[/-][+]consult: harden agy integration — Gemini lane silently drops out (upstream agy non-TTY stdout bug #76)[/+]amrmelsayed commentedon Jun 9, 2026
Fix options: PTY workaround vs wait-for-upstream (tradeoff)
The empty output is the upstream non-TTY stdout drop (google-antigravity/antigravity-cli#76). codev can work around it now or wait for an upstream flag. Options, in order of cost:
1. Diagnostics + loud degradation — do this regardless, cheap.
Fix
agySkipContentso the skip names the real cause (non-TTY stdout drop; link #76) instead of "not authenticated", and make the 3-way → 2-way drop visible so a 2-way consult is not mistaken for a 3-way. Independent of any agy change; pure win.2. PTY workaround — medium effort, brittle, opt-in.
Spawn agy attached to a pseudo-TTY so
isatty(stdout)is true and it flushes output; read the PTY master. codev already depends onnode-pty(Tower's terminal backend), so the dependency and expertise exist. Catch: the PTY yields the raw terminal stream — ANSI escapes, cursor moves, and agy's incremental "drip" TUI redraw — with no clean delimiters around the response, so consult must strip ANSI and reconstruct the final text from a redrawing stream. That parsing is version-sensitive (agy can change its TUI rendering at any time). Worth it only if a real 3-way Gemini verdict justifies the fragility.3. Upstream flag — cleanest, zero codev maintenance.
When agy ships
--output <path>/--format json/ unconditional stdout flush (all requested in #76), adopt it and delete any workaround. agy 1.0.6 has none of these yet (only--log-file, a diagnostic log, not the response).Long shot to rule out first: check whether
--log-filehappens to capture the model response (probably not — it is a diagnostic log).Recommendation: ship option 1 now; treat option 2 as opt-in (only if a 3-way Gemini verdict is needed); prefer option 3 when it lands. The Gemini lane is non-blocking, so none of this gates consults — they run 2-way (Codex + Claude) meanwhile.
amrmelsayed commentedon Jun 10, 2026
Update 2026-06-10: agy upgraded to 1.0.7 and the silent-drop symptom this issue describes appears to be resolved upstream.
Verified on this machine:
agy --version→1.0.7(was1.0.6when the symptom was observed)printf "say ok\n" | agy --print --sandbox→ returnsokcleanly in ~8s (was hanging silently with 0 bytes output)AGY_TIMEOUT_MSCaveat:
codev doctorstill reports✗ Gemini (agy) timeouteven with 1.0.7 working. That's a tighter verify-step budget inside doctor than the consult lane itself uses — not an agy issue. The actual builder consults should run the gemini lane successfully under 1.0.7.Net: the upstream
agyfix in 1.0.7 likely closes the main symptom this issue tracks. Worth leaving open one cycle to confirm across multiple builder consult runs that the silent-drop doesn't recur, then either close as fixed-upstream OR narrow scope to "tune the doctor's verify-step timeout so its report matches the consult lane's reality."amrmelsayed commentedon Jun 10, 2026
Additional symptom variant (from #789 PR-review consult — agy 1.0.6, macOS, builder worktree)
Instead of the documented zero-output drop, the Gemini lane returned a non-empty but contextless response (~123 bytes), reproduced on a retry:
agy ran (~18s, no auth/timeout marker) and flushed stdout, but emitted a generic "no task" greeting rather than a review — it never picked up the diff/prompt context.
Gap this exposes in the codev-ownable slice (item 2, silent degradation): the
closehandler only treats empty output as a skip (raw.length === 0→ skip;consult/index.ts:858-874). A non-empty greeting passes theraw.length > 0check and is recorded as a successful review (writeConsultOutput(raw)) even though it has noVERDICT:line and no review content — so the dropped lane isn't surfaced as a skip; downstream has to notice the missing verdict and hand-treat it.Suggestion: also detect non-review output — e.g. treat output with no
VERDICT:token (or matching agy's known "workspace is empty"/"what are we building" greeting) as a dropped lane, not a verdict — so a 3-way that silently became 2-way is surfaced consistently whether agy emits zero bytes or a greeting.