zeroclaw/src
Argenis c1095de1ac
Fix delegate agent timeout config regression (#4004)
* feat(delegate): make delegate timeout configurable via config.toml

Add configurable timeout options for delegate tool:
- timeout_secs: for non-agentic sub-agent calls (default: 120s)
- agentic_timeout_secs: for agentic sub-agent runs (default: 300s)

Previously these were hardcoded constants (DELEGATE_TIMEOUT_SECS
and DELEGATE_AGENTIC_TIMEOUT_SECS). Users can now customize them
in config.toml under [[delegate.agents]] section.

Fixes #3898

* feat(config): make delegate tool timeouts configurable via config.toml

This change makes the hardcoded 120s/300s delegate tool timeouts
configurable through the config file:

- Add [delegate] section to Config with timeout_secs and agentic_timeout_secs
- Add DelegateToolConfig struct for global default timeout values
- Add DEFAULT_DELEGATE_TIMEOUT_SECS (120) and DEFAULT_DELEGATE_AGENTIC_TIMEOUT_SECS (300) constants
- Remove hardcoded constants from delegate.rs
- Update tests to use constant values instead of magic numbers
- Update examples/config.example.toml with documentation

Closes #3898

* fix: keep delegate timeout fields as Option<u64> with global fallback

- Change DelegateAgentConfig.timeout_secs and agentic_timeout_secs from
  u64 to Option<u64> so per-agent overrides are truly optional
- Implement manual Default for DelegateToolConfig with correct values
  (120s and 300s) instead of derive(Default)
- Add DelegateToolConfig to DelegateTool struct and wire through
  constructors so agent timeouts fall back to global [delegate] config
- Add validation for delegate timeout values in Config::validate()
- Fix example config to use [agents.name] table syntax matching the
  HashMap<String, DelegateAgentConfig> schema
- Add missing timeout fields to all DelegateAgentConfig struct literals
  across codebase (doctor, swarm, model_routing_config, tools/mod)

* chore: trigger CI

* chore: retrigger CI

* fix: cargo fmt line wrapping in config/mod.rs

* fix: import timeout constants in delegate tests

* style: cargo fmt

---------

Co-authored-by: vincent067 <vincent067@outlook.com>
2026-03-24 15:29:57 +03:00
..
agent Fix Jira tool panics and dedup bug (#4003) 2026-03-24 15:29:57 +03:00
approval fix(channels): allow low-risk shell in non-interactive mode (#3771) 2026-03-24 15:17:26 +03:00
auth feat: stabilize codex oauth and add provider model connectivity workflow 2026-02-24 16:03:01 +08:00
channels feat(channel): add /stop command to cancel in-flight tasks 2026-03-24 15:29:57 +03:00
commands fix(cli): align self-test and update commands with implementation plan 2026-03-24 15:17:28 +03:00
config Fix delegate agent timeout config regression (#4004) 2026-03-24 15:29:57 +03:00
cost fix(agent): parse MiniMax tool call formats for execution 2026-02-21 12:36:28 +08:00
cron fix(cron): persist allowed_tools for agent jobs (#3993) 2026-03-24 15:26:29 +03:00
daemon feat(heartbeat): default interval 30→5min + prune heartbeat from auto-save (#3938) 2026-03-24 15:17:34 +03:00
doctor feat(delegate): make sub-agent timeouts configurable via config.toml (#3909) 2026-03-24 15:17:33 +03:00
gateway fix(cron): add startup catch-up and drop login shell flag (#3948) 2026-03-24 15:26:27 +03:00
hands feat(hands): add autonomous knowledge-accumulating agent packages (#3603) 2026-03-24 15:16:05 +03:00
hardware Addressed clippy lint issues 2026-03-10 01:48:19 -04:00
health refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
heartbeat feat(heartbeat): add health metrics, adaptive intervals, and task history 2026-03-24 15:17:14 +03:00
hooks feat(hooks): add webhook-audit builtin hook (#3212) 2026-03-11 23:34:17 -04:00
integrations fix(channels): respect ack_reactions config for Telegram channel (#3834) (#3913) 2026-03-24 15:17:32 +03:00
memory feat(heartbeat): default interval 30→5min + prune heartbeat from auto-save (#3938) 2026-03-24 15:17:34 +03:00
nodes feat(nodes): add secure HMAC-SHA256 node transport layer (#3654) 2026-03-24 15:17:12 +03:00
observability fix(observability): handle missing OtelObserver match arms and add all-features CI check (#3981) 2026-03-24 15:29:56 +03:00
onboard Fix delegate agent timeout config regression (#4004) 2026-03-24 15:29:57 +03:00
peripherals feat(knowledge): add knowledge graph for expertise capture and reuse (#3596) 2026-03-24 15:17:23 +03:00
plugins fix(plugins): integrate WASM tools into registry, add gateway routes and tests 2026-03-24 15:17:30 +03:00
providers style(zai): satisfy rustfmt in tool_stream request 2026-03-24 15:29:02 +03:00
rag chore(lint): extend low-risk clippy cleanup batch 2026-02-17 16:40:58 +08:00
runtime feat(tools): add Windows support for shell tool_call execution (#3442) 2026-03-13 17:12:16 -04:00
security feat(security): inject security policy summary into LLM system prompt (#4002) 2026-03-24 15:29:56 +03:00
service fix(service): headless browser works in service mode (systemd/OpenRC) (#3645) 2026-03-24 15:16:06 +03:00
skillforge chore: Remove blocking read strings 2026-02-19 14:52:29 +08:00
skills add configurable allow_scripts audit option (#4001) 2026-03-24 15:29:57 +03:00
sop fix(web): call doctor endpoint with authenticated POST 2026-02-24 16:02:59 +08:00
tools Fix delegate agent timeout config regression (#4004) 2026-03-24 15:29:57 +03:00
tunnel feat(tunnel): add OpenVPN tunnel provider (#3648) 2026-03-24 15:17:11 +03:00
i18n.rs feat(i18n): externalize tool descriptions for translation (#3912) 2026-03-24 15:17:33 +03:00
identity.rs test: cover deterministic HashMap ordering paths 2026-02-18 21:55:40 +08:00
lib.rs fix(cron): persist allowed_tools for agent jobs (#3993) 2026-03-24 15:26:29 +03:00
main.rs feat(i18n): externalize tool descriptions for translation (#3912) 2026-03-24 15:17:33 +03:00
migration.rs readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
multimodal.rs fix(agent): strip vision markers from history for non-vision providers (#3734) 2026-03-24 15:17:17 +03:00
util.rs fix(ci): restore containerized validation on main (#1096) 2026-02-20 07:48:58 -05:00