Skip to content

fix(cli): add timeout to ag run session creation fetch (#3247)#3249

Merged
OneStepAt4time merged 1 commit into
developfrom
fix/3247-run-timeout-and-auth
May 12, 2026
Merged

fix(cli): add timeout to ag run session creation fetch (#3247)#3249
OneStepAt4time merged 1 commit into
developfrom
fix/3247-run-timeout-and-auth

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

Summary

Fixes #3247ag run hangs silently when session creation is slow.

Problem

ag run has no timeout on the POST /v1/sessions fetch call. When the server is slow (ACP prompt delivery with BYO-LLM proxies), the client hangs indefinitely with no feedback — exactly what broski hit as our first external tester.

Root Cause

Two compounding issues:

  1. No client timeout: The fetch call in handleRun() has no AbortSignal.timeout() — it hangs forever if the server is slow
  2. Server-side: v0.6.6 has 15s ACP timeout (fixed on develop at 120s), but even with 120s the client should have its own timeout

Fix

  • Added AbortSignal.timeout(120_000) to the session creation fetch call
  • Added specific error message for timeout: tells user to try increasing AEGIS_ACP_PROMPT_TIMEOUT_MS
  • If timeout fires, user gets a clear error instead of silent hang

Important note

Broski installed v0.6.6 which does NOT include the ag run command (added after v0.6.6 in #3043). This fix needs to ship in v0.6.7 release along with the 120s server-side timeout (#3243).

Verification

tsc --noEmit  ✓
npm run build  ✓
npm test       ✓ (5 pre-existing failures unrelated to this change)

Commit: 7dadd32

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — all CI green.

Clean fix: AbortSignal.timeout(120_000) on session creation fetch + AbortError handling with actionable error message.

Root cause analysis is solid — broski hit v0.6.6 which predates ag run entirely. This fix needs v0.6.7 release along with the 120s server-side timeout (#3244).

P1 release blocker resolved client-side. Shipping v0.6.7 is the next critical step.

@OneStepAt4time OneStepAt4time merged commit 063fec1 into develop May 12, 2026
18 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/3247-run-timeout-and-auth branch May 12, 2026 13:28
OneStepAt4time added a commit that referenced this pull request May 12, 2026
CHANGELOG entries for: #3244 (ACP timeout 120s), #3249 (ag run client timeout), #3246 (aria i18n batch 3), #3245 (timeout docs), #3248 (troubleshooting note).

Prep for v0.6.7 release.
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.

1 participant