From b739623ee162701beb0122bf3018ca7fb4ff319c Mon Sep 17 00:00:00 2001 From: Owain Lewis Date: Wed, 15 Jul 2026 13:50:40 +0100 Subject: [PATCH] fix(config): increase default chat timeout --- docs/configuration.md | 4 ++-- src/config.rs | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index f9c8d6f..218f6ac 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -176,7 +176,7 @@ the selected agent and review [permissions and security](security.md). | `channels` | `[]` | Concurrent enabled providers | | `agent` | `"claude"` | Default backend | | `poll_interval` | `"3s"` | Delay between channel polls | -| `run_timeout` | `"120s"` | Maximum chat backend run time | +| `run_timeout` | `"10m"` | Maximum chat backend run time | | `claude_bin` | `"claude"` | Claude Code executable | | `codex_bin` | `"codex"` | Codex executable | | `codex_model` | unset | Optional Codex model override | @@ -216,7 +216,7 @@ channels = ["imessage", "telegram"] agent = "codex" assistant_root = "~/Code/assistant" poll_interval = "3s" -run_timeout = "120s" +run_timeout = "10m" [imessage] self_handles = ["you@icloud.com"] diff --git a/src/config.rs b/src/config.rs index 2e703eb..13d67f6 100644 --- a/src/config.rs +++ b/src/config.rs @@ -788,7 +788,7 @@ fn default_poll_interval() -> String { "3s".to_string() } fn default_run_timeout() -> String { - "120s".to_string() + "10m".to_string() } fn default_agent() -> String { "claude".to_string() @@ -914,6 +914,19 @@ mod tests { assert_eq!(cfg.pi_bin, "pi"); } + #[test] + fn chat_run_timeout_defaults_to_ten_minutes_and_accepts_an_override() { + let default: Config = toml::from_str("agent = 'codex'").unwrap(); + let overridden: Config = toml::from_str("agent = 'codex'\nrun_timeout = '45s'").unwrap(); + + assert_eq!(default.run_timeout, "10m"); + assert_eq!(default.run_timeout_dur().unwrap(), Duration::from_secs(600)); + assert_eq!( + overridden.run_timeout_dur().unwrap(), + Duration::from_secs(45) + ); + } + #[test] fn pi_binary_is_only_required_when_selected() { let mut cfg = config();