LibreChat/api/server/controllers/agents/__tests__
Marco Beretta 2cf1007f3c
🧺 feat: Preserve Partial Work at Tool Call Limits (#15486)
* feat: Handle reaching the agent tool-call limit gracefully

When the graph exhausts its per-turn step budget, persist the turn as
unfinished with finish_reason tool_call_limit instead of a red error.
Warn the model as the budget runs low, and offer Keep going or Answer now.

* docs: Add screenshots of the tool-call-limit notice

Light and dark captures of the unfinished-turn card for the PR description.

* style: Tighten the tool-call-limit notice card

Pin dismiss to the top-right with uniform rounding, use a slightly
smaller hit target, and round the card to xl. Refresh the PR screenshots.

* fix: Address Copilot review findings on the step-budget path

Skip empty and subagent-scoped PostToolBatch events when counting
rounds. Drop the double-cast in the notice test helper and coerce the
tool-call-limit finish reason in the Continue-gate spec.

* fix: Address Codex review findings on budget and dismiss

Pass the resolved recursion limit into the OpenAI-compatible
processStream path so the step-budget hook matches the graph.
Reset the notice dismiss state when the displayed message id changes.

* fix: Unblock CI typecheck and import sorting

Declare recursion_limit on the OpenAI service agent type, sort that
file's local imports, and route the notice test context through unknown
so tsc accepts the partial ChatContext fixture.

* fix: Sort remaining PR imports for static checks

* chore: Remove tool-call-limit notice screenshots

* fix: Keep recovery actions from consuming composer drafts

Pass empty file, skill, and quote overrides on Keep going and Answer
now so a staged compose is not attached or drained.
2026-09-01 21:38:02 -04:00
..
askUserQuestion.e2e.spec.js ⚡ feat: Reliable Interrupt & Steer Escalation and Recovery (#14558) 2026-07-31 20:07:56 -04:00
callbacks.spec.js 🧶 fix: Preserve Multi-Agent Tool Call History (#15468) 2026-09-01 18:37:45 -04:00
client.contextMetadata.spec.js 🪙 fix: Correct Context Usage Gauge After Summarization (#13744) 2026-06-14 18:23:30 -04:00
client.eventActorPause.spec.js 🤖 feat: make Event Actor HITL durable (#15305) 2026-08-28 08:05:11 -04:00
client.memory.spec.js
client.steerWiring.spec.js 🍵 feat: Continue Late Steers in Warm Agent Runs (#15357) 2026-08-30 11:54:17 -04:00
client.subagentUsage.spec.js 🧵 feat: Persist View-Only Subagent Threads (#14957) 2026-08-18 07:41:42 -04:00
client.transactions.spec.js 🧾 fix: Honor Disabled Transactions on the Token-Count Fallback Path (#14774) 2026-08-12 22:31:13 -04:00
hitlCheckpoint.e2e.spec.js ⚡ feat: Reliable Interrupt & Steer Escalation and Recovery (#14558) 2026-07-31 20:07:56 -04:00
jobReplacement.spec.js ⚡ perf: Persist HITL checkpoints only on pause (lazy checkpointer) (#14024) 2026-07-05 08:30:06 -04:00
modelEndHandler.spec.js 🧾 fix: Report Complete Agents API Usage (#15127) 2026-08-23 02:37:09 -04:00
openai.spec.js 🧶 fix: Preserve Multi-Agent Tool Call History (#15468) 2026-09-01 18:37:45 -04:00
protocol.spec.js 🛫 refactor: Promote Generation Protocol V2 Automatically (#15324) 2026-08-28 17:17:09 -04:00
request.partialDisconnect.spec.js 🍵 feat: Continue Late Steers in Warm Agent Runs (#15357) 2026-08-30 11:54:17 -04:00
request.resumeMetadata.spec.js 🧺 feat: Preserve Partial Work at Tool Call Limits (#15486) 2026-09-01 21:38:02 -04:00
responses.unit.spec.js 🧺 feat: Preserve Partial Work at Tool Call Limits (#15486) 2026-09-01 21:38:02 -04:00
resume.spec.js 🕰️ fix: Anchor Temporal Variables to Turn Start (#15419) 2026-08-31 10:38:10 -04:00
steer.spec.js 🛫 refactor: Promote Generation Protocol V2 Automatically (#15324) 2026-08-28 17:17:09 -04:00
usageEvents.integration.spec.js 🪙 refactor: Reconcile Context Gauge to Actual Provider Tokens (#13780) 2026-06-16 11:05:44 -04:00
usageEvents.live.spec.js
v1.duplicate-actions.spec.js 🛞 feat: Manage Personal Code Environment Lifecycles (#15369) 2026-09-01 21:10:05 -04:00
v1.spec.js 🕸️ feat: Run Saved Agent Teams as Subagents (#14944) 2026-08-17 18:02:52 -04:00