fix(#1220): remove default 180s timeout from bash run — no timeout unless explicitly set

This commit is contained in:
damocles 2026-06-03 22:30:43 +02:00 committed by mara
commit 280ae23c0c
3 changed files with 46 additions and 29 deletions

View file

@ -138,8 +138,9 @@ fn render_bash_status(id: &str, resp: Result<DaemonResponse>) -> String {
struct BashRunArgs {
/// Shell command to run (passed to `sh -c`).
cmd: String,
/// Timeout in seconds. Defaults to 180. Task is killed and marked
/// `timed_out` when the limit is exceeded.
/// Timeout in seconds. Defaults to `None` (no timeout) — task runs until
/// natural exit. Pass an explicit value to kill the task after N seconds
/// and mark it `timed_out`.
#[serde(default)]
timeout_secs: Option<u64>,
/// Optional inline wait: `run` polls for up to `wait_seconds`
@ -177,12 +178,14 @@ impl BashMcp {
do NOT wait inline. When the command finishes, the harness fires a wake with \
`from: \"bash-task-<id>\"` and the exit code + last stdout lines in the body; \
handle it on a future turn. Use `status` to poll the task status within \
the same turn if needed. `timeout_secs` defaults to 180. Pass `wait_seconds` \
(capped at 30) to wait inline for fast commands: when the task finishes within \
the window the full status is returned immediately and no wake is fired; when \
the timeout expires the task keeps running and the normal `task started: id=<id>` \
response is returned. `wait_seconds` defaults to 3; pass `wait_seconds: 0` to \
disable inline waiting and always get the immediate response."
the same turn if needed. `timeout_secs` defaults to `None` (no timeout) \
task runs until natural exit; pass an explicit value to kill after N seconds. \
Pass `wait_seconds` (capped at 30) to wait inline for fast commands: when the \
task finishes within the window the full status is returned immediately and no \
wake is fired; when the timeout expires the task keeps running and the normal \
`task started: id=<id>` response is returned. `wait_seconds` defaults to 3; \
pass `wait_seconds: 0` to disable inline waiting and always get the immediate \
response."
)]
async fn run(&self, Parameters(args): Parameters<BashRunArgs>) -> String {
let req = DaemonRequest::BashRun {