Skip to content

feat(api): a chat turn may wait the full queue maximum - #12113

Merged
MarkusNeusinger merged 3 commits into
mainfrom
feat/agents-turn-cap
Oct 10, 2026
Merged

MarkusNeusinger merged 3 commits into
mainfrom
feat/agents-turn-cap

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • anyplot-api's Cloud Run request timeout rises from 600 to 900 seconds (api/cloudbuild.yaml) and the BFF's turn cap AGENT_TURN_MAX_S from 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 own error and done instead of being cut at about 385 seconds.
  • The design document records the owner's decisions of 2026-10-10 on the three open points from feat(agents): run queue, one theme per run and the theme toggle #12112: raise the timeout (this PR), keep the queue's capacity formula, keep one run or theme toggle in flight per user.
  • Docs: docs/reference/api.md and .env.example follow 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 --check pass
  • tests/unit/api/test_agent_router.py and tests/unit/core pass (the turn-cap test overrides the setting, so the default change touches no assertion)
  • After merge: the deploy-api Cloud Build applies --timeout=900 to the anyplot-api service (watch the build and gcloud run services describe anyplot-api --format='value(spec.template.spec.timeoutSeconds)')

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
Copilot AI balanced review requested due to automatic review settings October 9, 2026 22:51
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M

Copilot AI 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.

🟡 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.

Comment thread changelog.d/agents-turn-cap.md Outdated
Comment thread core/config.py
Comment thread docs/reference/api.md
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

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@MarkusNeusinger
MarkusNeusinger merged commit 68089da into main Oct 10, 2026
16 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the feat/agents-turn-cap branch October 10, 2026 06:56
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.

2 participants