Skip to content

Delegation tools (delegate_tools_agent, run_code) hard-killed at 120s: ArchetypeDelegationTool needs Unbounded timeout_policy #4734

Description

@oxoxDev

Source

Sentry: TAURI-RUST-K29 (delegate_tools_agent) + TAURI-RUST-8HB (run_code) — project tauri-rust
Events: 1236 + 755 · Users affected: 71 + 51 · Last seen: 2026-07-09 · Release: 0.58.7

Symptom

  • tool 'delegate_tools_agent' timed out after 120 seconds
  • tool 'run_code' timed out after 120 seconds

A legitimate multi-step sub-agent delegation is hard-killed at exactly 120.000s and truncated.

Root cause

Both tools are synthesized by the same type ArchetypeDelegationTool (src/openhuman/agent_orchestration/tools/archetype_delegation.rs) — delegate_tools_agent → tools_agent, run_code → code_executor. It does not override timeout_policy(), so it defaults to ToolTimeout::Inherit = the global 120s per-tool cap (src/openhuman/tool_timeout/mod.rs DEFAULT_TIMEOUT_SECS = 120). The delegate agents are internally bounded (agent.toml max_iterations, iteration policy, run cancellation token), so a real delegation legitimately exceeds 120s and gets truncated.

The sibling spawn_parallel_agents tool had this exact bug fixed in merged PR #4686 (override timeout_policy() -> ToolTimeout::Unbounded); shell / node_exec / npm_exec are already Unbounded-by-default.

Fix direction

Override timeout_policy() -> ToolTimeout::Unbounded on ArchetypeDelegationTool, mirroring PR #4686. Add a unit test asserting the override (mirror spawn_parallel_agents_tests.rs). One shared fix closes both Sentry issues. SkillDelegationTool / DelegateTool route to quick agents and are intentionally left on the default (no speculative widening).

S3.5 bucket

real-defect — RCA: wrong timeout policy truncating internally-bounded delegation. Not suppression.

Reproduces on

upstream/main (override still absent).

Bug shape

Tool timeout policy — Unbounded override for internally-bounded long-runner.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions