Skip to content

fix(mini-swe-agent): honor the tool timeout - #3273

Merged
hallerite merged 3 commits into
mainfrom
codex/mini-swe-tool-timeout
Nov 25, 2026
Merged

hallerite merged 3 commits into
mainfrom
codex/mini-swe-tool-timeout

Conversation

@hallerite

@hallerite hallerite commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Set mini-SWE-agent v2.4.6's environment.timeout from harness.tool_timeout, rounding up to whole seconds.
  • Let a Bash command timeout return a tool error so the agent can continue within the rollout deadline.

Validation

  • A scripted run with v2.4.6 timed out a Bash command, ran a follow-up command, and submitted successfully.
  • Unit tests on current main passed with 318 passed and 19 skipped. Ruff and ty passed.
  • The all-files markdownlint hook flagged an existing unlabeled code fence in environments/web_search_interception/README.md on main.

Note

Medium Risk
Changes rollout timeout behavior and how failed agent runs are classified; affects evaluation outcomes but not auth or persistence.

Overview
The mini-swe-agent harness now passes environment.timeout as ceil(tool_timeout) instead of a fixed 86400 seconds, so per-command timeouts align with the harness rollout limit and long-running bash calls surface as tool errors the agent can recover from.

The staged program runs app(standalone_mode=False), forwards integer return values as process exit codes, and exits with code 98 when the agent ends on RepeatedFormatError. The harness injects that constant into the script and overrides _check_result to call trace.stop("format_violation") on that exit code instead of treating the run as a normal completion.

Reviewed by Cursor Bugbot for commit 1a53615. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix mini-SWE-agent harness to honor configured tool timeout

  • Replaces the hardcoded 86400-second environment timeout in MiniSWEAgentHarness.launch with the configured tool timeout rounded up to a whole second via ceil (harness.py)
  • Adds a module-level constant for the repeated-format-error exit code (98) and substitutes it into the loaded program source template
  • MiniSWEAgentHarness._check_result stops traces with reason format_violation when the result has exit code 98; other codes go to the superclass checker
  • The program entrypoint in program.py exits with the configured code when the agent's final message reports extra.exit_status of RepeatedFormatError, and exits with integer values returned by the CLI
  • Behavioral Change: mini-SWE-agent runs now end at the configured tool timeout instead of running up to 24 hours; exit code 98 now terminates traces as format_violation

Macroscope summarized 1a53615.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Nov 25, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1f2ed91

Macroscope's review found this PR approvable — Mini-SWE-agent now honors the configured tool timeout and reports repeated format errors as trace format violations. The changes are confined to this harness's rollout execution and reporting, with no evident broader operational or data exposure.

You can add or adjust custom eligibility rules. Learn more.

samsja
samsja previously approved these changes Nov 25, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Nov 25, 2026
@hallerite
hallerite dismissed stale reviews from macroscopeapp[bot] and samsja via 1a53615 November 25, 2026 00:47
@hallerite
hallerite force-pushed the codex/mini-swe-tool-timeout branch from 1f2ed91 to 1a53615 Compare November 25, 2026 00:47
@hallerite
hallerite merged commit ceea2ad into main Nov 25, 2026
43 of 44 checks passed
@hallerite
hallerite deleted the codex/mini-swe-tool-timeout branch November 25, 2026 00:50
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.

3 participants