Skip to content

feat(agent): allow per-call subagent timeouts - #584

Open
changer-changer wants to merge 1 commit into
OpenBMB:mainfrom
changer-changer:feat/subagent-call-timeout
Open

changer-changer wants to merge 1 commit into
OpenBMB:mainfrom
changer-changer:feat/subagent-call-timeout

Conversation

@changer-changer

Copy link
Copy Markdown

The agent tool currently gives every child the same configured timeout. This adds optional timeout_ms so the parent can give a quick lookup a shorter deadline or allow a longer investigation without changing the saved defaults. Omission keeps the existing configured timeout / one-hour fallback.

The change is confined to the agent tool: both normal and ask-mode schemas expose positive integer milliseconds, and the value is passed to the existing fork timeout. Invalid values (including timer overflow) are rejected before starting work. Parent cancellation still applies. Standalone single-shot hosts explicitly reject the option instead of silently ignoring it. See usage and boundaries.

Validation:

  • Production build and final typecheck passed; 29 focused tests passed (9 new).
  • Full backend regression: 569 passed, 0 failed, 7 cancelled, 2 skipped. The seven cancellations are the unchanged networkFetch tests, reproduced independently on the baseline.
  • Six deterministic native-gateway checks passed: shorter override, longer override, omitted/default success and expiry, parent cancellation, and invalid input before child execution. The shorter and longer cases fail without this change.
  • The combined validation branch includes the current feat(agent): configure subagent roles and model bindings #576/feat(settings): expose subagent execution timeout #579/feat(agent): continue completed subagent tasks #580/feat(agent): run subagents in the background #581 changes and forwards the timeout through background dispatch. Twelve additional gateway checks passed for custom-role background calls and resumed child sessions. Combined build passed; backend regression was 679 passed, 0 failed, the same 7 cancellations, and 2 skipped.
  • A controlled GLM-5.3-Flash run on that combined branch set timeout_ms: 1000; the actual child request was aborted after about one second despite a 60-second configured default, and the timeout was returned to the parent. An initial standalone live run reached a provider parameter error before the deadline; it is not counted as a passing timeout test. The combined branch contains the existing provider-metadata compatibility change from feat(agent): configure subagent roles and model bindings #576.

This PR is based directly on main and changes one source file plus tests/docs. It is separate from #579 (the user's default timeout setting) and introduces no new timer, settings screen, or task lifecycle machinery. Related pending subagent changes share this tool path; the combined branch contains the resolved integration for review. No general task-quality or performance improvement is claimed from these controlled checks.

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