Skip to content

Fix step budgets for follow-up turns in checkpointed conversations - #1201

Merged
PurpleCHOIms merged 2 commits into
mainfrom
fix/turn-scoped-step-budget-20261116
Nov 16, 2026
Merged

PurpleCHOIms merged 2 commits into
mainfrom
fix/turn-scoped-step-budget-20261116

Conversation

@PurpleCHOIms

Copy link
Copy Markdown
Member

A long checkpointed conversation could exhaust the step budget before a new operator request used any tools. Count messages from the latest actual HumanMessage so each operator turn receives its configured budget. Tool results and interrupt/resume continuations retain the current turn; message content cannot reset it.

Verification: 12 focused cases pass, including real offline LangChain/LangGraph execution with InMemorySaver across two completed turns and repeated interrupts. The wider middleware/agent suites pass 1,111 cases; one optional Transformers test is explicitly skipped. Scoped Ruff lint/format and introduced-commit Gitleaks pass. Frozen runtime: LangChain1.4.7/core1.7.0, LangGraph1.2.17, DeepAgents0.7.32. No external provider/model calls, package publication or version bump; no hosted-CI pass is claimed.

Commands: uv run --frozen pytest packages/decepticon/tests/unit/middleware packages/decepticon/tests/unit/agents -q; uv run --frozen ruff check on the three changed Python files.

CHAGELOG.md

@PurpleCHOIms
PurpleCHOIms merged commit 1c0df39 into main Nov 16, 2026
25 checks passed
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