Skip to content

fix(runner): raise total run deadline to 24 hours - #6091

Open
mmabrouk wants to merge 1 commit into
mainfrom
agent/remove-default-total-run-deadline
Open

fix(runner): raise total run deadline to 24 hours#6091
mmabrouk wants to merge 1 commit into
mainfrom
agent/remove-default-total-run-deadline

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Long agent runs still making progress were aborted after 45 minutes with total run deadline of 2700000ms exceeded.

This raises the default total deadline to 24 hours. The idle, first-response, and per-tool-call limits continue to reclaim stalled runs. Deployments can still set AGENTA_RUNNER_RUN_TOTAL_TIMEOUT_MS to a different positive millisecond value.

The OSS and Enterprise Edition environment examples now show the 24-hour default.

Fixes #6084

Tests

  • pnpm exec vitest run tests/unit/run-limits.test.ts (13 passed)
  • pnpm run typecheck
  • pnpm test (complete runner unit suite passed)
  • git diff --check

How to review

  1. Read services/runner/src/engines/sandbox_agent/run-limits.ts for the default change.
  2. Read services/runner/tests/unit/run-limits.test.ts for the former 45-minute regression case and override coverage.
  3. Read the four environment example changes for operator-facing configuration.
  4. Read the acp-fetch.ts comment update, which keeps its explanation accurate after the total deadline increases.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 17, 2026 7:30pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c85d9107-1b81-4e9f-b041-3aaa8a5a1267

📥 Commits

Reviewing files that changed from the base of the PR and between 1df3eed and 0d5b755.

📒 Files selected for processing (7)
  • hosting/docker-compose/ee/env.ee.dev.example
  • hosting/docker-compose/ee/env.ee.gh.example
  • hosting/docker-compose/oss/env.oss.dev.example
  • hosting/docker-compose/oss/env.oss.gh.example
  • services/runner/src/engines/sandbox_agent/acp-fetch.ts
  • services/runner/src/engines/sandbox_agent/run-limits.ts
  • services/runner/tests/unit/run-limits.test.ts

Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Increased the default maximum runtime for executions from 45 minutes to 24 hours.
    • Runs that continue making progress can now operate beyond the former 45-minute limit.
  • Documentation

    • Updated configuration guidance to reflect the 24-hour default and available overrides.
    • Clarified timeout behavior for sandbox-agent communication.

Walkthrough

The runner total deadline increased from 45 minutes to 24 hours. Enterprise and OSS environment examples now show the new default. ACP timeout comments and run-limit tests were updated.

Changes

Runner deadline configuration

Layer / File(s) Summary
Total deadline and validation
services/runner/src/engines/sandbox_agent/run-limits.ts, services/runner/tests/unit/run-limits.test.ts
The default total deadline is now 24 hours. Tests verify that progress through 45 minutes does not trigger a timeout.
Deployment defaults and timeout documentation
hosting/docker-compose/ee/env.ee.dev.example, hosting/docker-compose/ee/env.ee.gh.example, hosting/docker-compose/oss/env.oss.dev.example, hosting/docker-compose/oss/env.oss.gh.example, services/runner/src/engines/sandbox_agent/acp-fetch.ts
Enterprise and OSS examples use 86400000 ms. ACP comments describe transport timeout scope and run-limit behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0d5b7

The default total run deadline increases to 24 hours while existing idle and per-call limits remain in place; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address issue #6084 by raising the total deadline to 24 hours while retaining configurable limits and stalled-run protections.
Out of Scope Changes check ✅ Passed All changes support the linked issue and PR objectives, including implementation, configuration examples, comments, and regression tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the runner's total deadline to 24 hours.
Description check ✅ Passed The description directly explains the deadline change, preserved safeguards, configuration override, updated examples, tests, and linked issue.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/remove-default-total-run-deadline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

QA evidence

Video proof: https://www.browserbase.com/sessions/4a764652-f078-471b-a3ea-4b7ef732161b

Tested commit: 0d5b755aae19ae88bba49553015bfabd8a276442

Deployed image: agenta-runner:pr-6091-0d5b755 with matching org.opencontainers.image.revision label.

Scenario Verdict Evidence
Default passes the former 45-minute cutoff Pass Fake-clock regression test advances a progressing run beyond 2,700,000 ms without a trip. Focused suite: 13 passed.
Operator override still enforces a total deadline Pass Existing override test and deadline-trip test pass.
Stall protections remain active Pass Idle, first-response, and per-tool-call deadline tests pass.
Exact deployed runner uses the new default Pass Live process resolved totalMs=86400000; internal runner health and API health returned 200.
Model-backed run completes and persists Pass Recorded DeepSeek V4 Flash turn returned 24-hour runner active. in 12.56 seconds; the response remained visible after refresh.

Additional checks:

  • Complete runner unit suite passed.
  • Runner TypeScript type checking passed.
  • git diff --check passed.
  • GitHub secret scan passed. Other repository workflows were skipped by path filters.

Cleanup completed: both Browserbase sessions stopped, exe.dev restored to private, and the temporary SSH key was revoked and proved unusable. The exact PR runner image remains deployed for review.

@mmabrouk
mmabrouk marked this pull request as ready for review August 17, 2026 19:51
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. backend bug tests labels Aug 17, 2026
@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6091.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6091-ea697ce
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-17T19:56:13.054Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(feat) Long agent runs are killed at 45 min by the runner total-run deadline

1 participant