fix(agents): raise cloud-agent run timeout 30s→180s (long-run 502)#58
Merged
Conversation
d68ba08 to
4c19af7
Compare
Contributor
🚨 Unused NPM Packages DetectedThe following unused dependencies were found: 📂 Root
|
…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>
4c19af7 to
968467d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cloud-agents run path (
CloudAgentsClient→POST 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 existingCLOUD_AGENT_MAX_CONCURRENT). Only/runneeds the headroom; list/get stay fast.Pairs with the ops change adding
HANZO_CLOUD_URLto themaxpower-chattenant so the cloud-agents bridge is enabled there too.🤖 Generated with Claude Code