Repository navigation
feat(api): a chat turn may wait the full queue maximum - #12113
Merged
Merged
Conversation
anyplot-api's Cloud Run request timeout rises from 600 to 900 s and the BFF's AGENT_TURN_MAX_S from 590 to 890 s, so a turn at the back of a full run queue (600 s of waiting plus the 180 s run) ends with its own error and done. The design doc records the owner's decisions of 2026-10-10: the capacity formula stays, and one run or toggle in flight per user stays. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several descriptions retain the old 385-second limit, and completed decisions use a future date.
3 open findings
What changed in this PR
Extends agent chat turns to support the full queue wait while remaining within Cloud Run’s request timeout.
Changes:
- Raises Cloud Run timeout to 900 seconds.
- Raises the BFF turn cap to 890 seconds.
- Updates configuration, design documentation, and changelog.
| File | Description |
|---|---|
api/cloudbuild.yaml |
Raises the deployment timeout. |
core/config.py |
Raises the default turn cap. |
.env.example |
Updates configuration guidance. |
docs/reference/api.md |
Documents API timeout behavior. |
docs/concepts/agent-network.md |
Records queue and timeout decisions. |
changelog.d/agents-turn-cap.md |
Adds the user-facing change entry. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The config docstring, the agents README, the API reference and the changelog fragment no longer describe the old 385-second effective limit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.

Summary
api/cloudbuild.yaml) and the BFF's turn capAGENT_TURN_MAX_Sfrom 590 to 890 seconds, so a chat turn at the back of a full run queue (600 seconds of waiting plus the 180-second run) ends with its ownerroranddoneinstead of being cut at about 385 seconds.docs/reference/api.mdand.env.examplefollow the new values.Plan
docs/concepts/agent-network.md(bounds table, SSE section, open decisions, risks).Test plan
uv run ruff check .,uv run ruff format --check ., mypy (95 files),tools.changelog check,uv lock --checkpasstests/unit/api/test_agent_router.pyandtests/unit/corepass (the turn-cap test overrides the setting, so the default change touches no assertion)--timeout=900to theanyplot-apiservice (watch the build andgcloud run services describe anyplot-api --format='value(spec.template.spec.timeoutSeconds)')