Repository navigation
[Fix] Long tasks stop at 200 tool calls and cannot be resumed - #3684
Merged
Merged
Conversation
Remove the per-pass 200-tool and 100-step caps, which stopped legitimate long tasks well under the lifetime request ceiling. Creating a resume run now releases a pass-level safety stop in the run-creation transaction; the request counter is never reset and a request-ceiling stop stays latched. Parent-session stop notices are keyed per run so a later stop is not dropped.
Contributor
|
No code issues found. See session Reviewed the removal of pass-count caps, transactional release of resumable stops, preservation of the lifetime request ceiling, and per-run stop notices, including the surrounding resume and cancellation paths. CI lint, type checks, Knip, docs validation, upgrade compatibility, and worker build have passed; tests and the app build are still running. Reviewed e23d534 |
Merged
6 of 9 tasks
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.
Problem
The agent safety limits added in #3658 stop legitimate long tasks:
task_request_limit, which is misleading.Change
pass_tool_limitandpass_step_limitremain accepted reasons, so older workers can still report them (N-1).task_request_limitstop, or a counter already at the ceiling, stays latched. Runaway spend therefore stays bounded per task, whatever resumes the task.agent-safety:<task>:<run>). Otherwise a second stop after a resume would be silently dropped by the conflict guard.tasks.mdx) and the package notes (packages/db/agent-safety.md).Validation
@roomote/typesagent-safety tests@roomote/dblib tests (899), including new release and ceiling tests against the real test DB@roomote/cloud-agentsenqueue-task tests (a resume releases the latch and keeps the count) and non-task-provider-usage testspnpm check-types:fast,pnpm lint:fast