Conversation
Errors: every failure is branched on the error.code in the response body instead of the HTTP status or message text. try_again, capacity_unavailable, an invalid_request on a waking instance and the instance-URL codes for a container that is not up bring the instance to running and retry once; no_capacity on create is waited out; instance_limit_reached is reported with a clear message; provisioning_failed on a running instance is never retried because the command may still be running. Timeouts: the exec call waits up to 780 seconds including a wake, so the client abort is sized to that cap plus a margin for every exec and file request instead of 150 seconds for the launch and poll execs. Commands of up to 600 seconds run synchronously, leaving room for the two-minute wake from cold storage; longer ones run detached as before. Files: reads, writes, spooled output and export archives go through PUT/GET /v1/files/content on the instance URL with X-Agent37-Key, which stream any size, instead of 64 KB / 256 KB base64 exec chunks. Lifecycle: AGENT37_IDLE_TIMEOUT_SEC maps to idle_timeout_seconds (300 to 86400, default 900); the default template is pinned to agent37-codex@2026.09.14b; instances carry user and metadata tags naming the qm prefix and scope or scratch key and are found by those tags, adopting and tagging a name-only instance once; cpu/memory/disk are validated against the fixed 2/4, 4/8 and 8/16 shapes and the name prefix against the 60-character name limit at construction. Recovery: computerStatus reports the newest nightly or on-demand backup as the provider_snapshot recovery point without waking a sleeping instance; teardown after a turn that touched the home requests an on-demand backup; restartComputer wakes the instance if needed and recreates its container through POST /restart. The ADR now states the 780-second exec cap, the 900-second default idle timeout and the files API.
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.
Aligns the Agent37 backend with the Agent37 agents API documentation.
Docs: https://www.agent37.com/docs/agents-api/errors.md https://www.agent37.com/docs/agents-api/exec.md https://www.agent37.com/docs/agents-api/files.md https://www.agent37.com/docs/agents-api/instances.md
Needs live QA before merge.