Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

### Local state

Expand Down Expand Up @@ -210,7 +210,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"]
Expand Down
15 changes: 14 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,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()
Expand Down Expand Up @@ -895,6 +895,19 @@ mod tests {
assert_eq!(cfg.agent_bin(AgentBackend::Pi), "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();
Expand Down
Loading