Skip to content

fix(agents): raise cloud-agent run timeout 30s→180s (long-run 502)#58

Merged
zeekay merged 2 commits into
mainfrom
fix/cloud-agent-run-timeout
Jul 4, 2026
Merged

fix(agents): raise cloud-agent run timeout 30s→180s (long-run 502)#58
zeekay merged 2 commits into
mainfrom
fix/cloud-agent-run-timeout

Conversation

@zeekay

@zeekay zeekay commented Jul 3, 2026

Copy link
Copy Markdown
Member

The cloud-agents run path (CloudAgentsClientPOST api.hanzo.ai/v1/agents/:name/run) used a hardcoded 30s HTTP timeout. A real run is a chat completion — zen5-mini answers take ~25-30s (measured 28s), larger models/prompts longer — so long runs aborted mid-flight and surfaced in the UI as a 502 even though the cloud run finished and recorded.

Fix: default timeout 30s→180s, env-configurable via CLOUD_AGENT_TIMEOUT (mirrors the existing CLOUD_AGENT_MAX_CONCURRENT). Only /run needs the headroom; list/get stay fast.

Pairs with the ops change adding HANZO_CLOUD_URL to the maxpower-chat tenant so the cloud-agents bridge is enabled there too.

🤖 Generated with Claude Code

@zeekay zeekay force-pushed the fix/cloud-agent-run-timeout branch 3 times, most recently from d68ba08 to 4c19af7 Compare July 4, 2026 11:33
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🚨 Unused NPM Packages Detected

The following unused dependencies were found:

📂 Root package.json

  • @opentelemetry/exporter-trace-otlp-http
  • @opentelemetry/sdk-trace-base

⚠️ Please remove these unused dependencies to keep your project clean.

zeekay and others added 2 commits July 4, 2026 04:48
…TIMEOUT)

A cloud agent run is a real chat completion — a zen5-mini answer routinely
takes ~25-30s (measured 28s), larger models/prompts longer. The hardcoded 30s
client timeout aborted long runs mid-flight, surfacing in the UI as a 502 even
though the cloud run finished and was recorded. Bump the default to 180s and
make it env-configurable (CLOUD_AGENT_TIMEOUT), matching the existing
CLOUD_AGENT_MAX_CONCURRENT knob. List/get are fast; this headroom only affects
/run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nv override)

Adds coverage the timeout bump lacked: asserts the 180s default (the fix for
the 30s -> in-UI 502), that an explicit constructor timeout wins, and that
CLOUD_AGENT_TIMEOUT overrides the module-load default (isolated re-require).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zeekay zeekay force-pushed the fix/cloud-agent-run-timeout branch from 4c19af7 to 968467d Compare July 4, 2026 11:48
@zeekay zeekay merged commit b6a82bc into main Jul 4, 2026
6 of 9 checks passed
@zeekay zeekay deleted the fix/cloud-agent-run-timeout branch July 4, 2026 12:14
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