fix(agy-acp)!: default prompt timeout to twenty minutes - #1534
Conversation
Preserve explicit timeout overrides in both CLI forms and document migration back to five minutes.
This comment has been minimized.
This comment has been minimized.
|
Addressed F1 and F2 in commit 0152390:
Validation on this commit:
Regarding the three motivation questions:
Please re-check F1/F2 and regressions against the existing acceptance criteria. No contract scope or runtime behavior changed in this follow-up. |
This comment has been minimized.
This comment has been minimized.
|
Round-2 response at 446facf: F1 — fixed. The table now says “Extra arguments added to every F2 — proposed scope change; maintainer disposition requested. The current PR contract explicitly says “Invalid explicit timeout values remain subject to CLI validation.” Missing/empty values are operator configuration errors under that policy, and the follow-up const/doc edit did not introduce this behavior. The pre-PR adapter likewise passed these arguments through to agy. Simply appending the default does not repair the malformed argument: I therefore retained CLI validation and added Validation:
Please verify F1 and provide disposition on F2 against the proposed contract before further implementation changes. |
This comment has been minimized.
This comment has been minimized.
|
Note LGTM ✅ — Final consolidated review. A multi-reviewer group pass on head What This PR DoesLong Antigravity turns were failing with How It WorksA helper Findings
Finding Details🟢 F1: Correct override detectionThe predicate treats an arg as an explicit timeout only when it equals 🟢 F2: Uniform application to all prompt turns
🟢 F3: Full acceptance-criteria coverageThe tests encode: empty input yields exactly one default pair; 🟢 F4: No shell injection
🟢 F5: Accurate documentationThe env-var table scopes the behavior to "every 🟢 F6: Clean, honest scopeExactly two files change. Addressing All Reviewer FeedbackThis is the single self-contained record for the PR. It resolves every prior thread; earlier review summaries are superseded and minimized. There are no inline (line-level) review threads on this PR; all feedback was exchanged as top-level comments, addressed below. Round 1 -> Round 2 (contributor follow-up on commit
|
What problem does this solve?
Long Antigravity turns can fail with JSON-RPC
-32000, wrappingagy failed: Error: timeout waiting for response. The incident report from Neon identifies the CLI's inherited 5-minute print timeout: a 1-second timeout reproduced the same error, and an ACP subprocess capture confirmedAGY_EXTRA_ARGSforwards a 20-minute override. Those live CLI observations are reported evidence, not tests rerun in this authoring environment.agy-acpcurrently supplies no timeout. This change supplies 20 minutes unless the operator explicitly overrides it.Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365157010542652/1549101435558437047
Review Contract
Goal
Give every agy prompt a default
--print-timeout 20m, while preserving operator-supplied timeout values.Non-goals
Changing ACP error handling, cancellation, OpenAB pool deadlines, streaming, retries, or deployment configuration; guaranteeing that every long-running turn succeeds.
Accepted Residual Risks
Proposed for maintainer approval: a stalled CLI can occupy a turn longer, and tasks exceeding 20 minutes can still time out. Operators can choose a shorter or longer duration through
AGY_EXTRA_ARGS. Invalid explicit timeout values remain subject to CLI validation. Other timeout layers may expire earlier. The contract is not yet frozen.Acceptance Criteria
--print-timeout 20mpair.--print-timeout 5mand--print-timeout=30mretain their explicit values without an added default.Follow-ups
Independent work may improve timeout diagnostics or cancellation and assess other timeout layers. These are outside this argument-default fix and are non-blocking unless direct evidence shows this change cannot meet its goal.
At a Glance
Prior Art & Industry Research
OpenClaw: Its agent-loop timeout documentation separates elapsed runtime budgets, CLI no-output watchdogs, and wait-only deadlines. This supports targeting the failing timeout layer rather than raising unrelated outer deadlines.
Hermes Agent: Its environment variable reference documents an operator-configurable
HERMES_AGENT_TIMEOUTinactivity budget that resets on progress. That is different from agy's print timeout; it supports configurability, not the specific 20-minute value proposed here.Proposed Solution
Parse
AGY_EXTRA_ARGSin a small helper, preserving the existing malformed-input behavior. Recognize the exact--print-timeouttoken or--print-timeout=prefix. Add--print-timeout 20monly if neither exists. Use the helper before session options and the prompt are appended, and document configuration and migration.Why this approach?
It uses the existing CLI option and existing operator override mechanism, with a finite default proposed in the incident handoff. No new configuration surface or timeout supervisor is needed. Twenty minutes is a practical proposed default, not a measured guarantee for all workloads.
Alternatives Considered
AGY_EXTRA_ARGS: useful as an immediate workaround, but leaves other deployments inheriting the short CLI timeout.The default changes from the installed CLI's timeout (reported as 5 minutes in the incident) to 20 minutes. To retain the previous 5-minute budget, set
[agent.env] AGY_EXTRA_ARGS = "--print-timeout 5m"(preserving any other existing extra arguments). Explicit timeout overrides remain unchanged.Validation
cargo check --manifest-path agy-acp/Cargo.toml(three existing dead-code warnings).cargo test --manifest-path agy-acp/Cargo.toml: 32 passed, 0 failed, 6 existing ignored tests; includes four new regression tests.git diff --check; new helper and test blocks formatted with rustfmt.cargo fmt --manifest-path agy-acp/Cargo.toml -- --checkreports existing formatting differences, independently reproduced on the original adapter source.cargo clippy --manifest-path agy-acp/Cargo.toml -- -D warningsreports six errors. Running the same command against untouched base 843bb72 reproduces exactly the same six diagnostics: three dead-code items, type complexity, a PathBuf argument, and too many arguments. No new Clippy diagnostic was introduced.The requester explicitly authorized publication after the baseline failures above were disclosed. These failures remain visible for upstream maintainer review; publication does not imply approval to merge.