Compare commits

..

View file

@ -526,15 +526,12 @@ async fn run_task(mut task: TaskFile, socket: &Path) {
if let Err(e) = write_task(&task) { if let Err(e) = write_task(&task) {
tracing::warn!(id = %id, error = ?e, "bash_runner: write running state failed"); tracing::warn!(id = %id, error = ?e, "bash_runner: write running state failed");
} }
// No command text in the summary: `id` is already the human-chosen upsert_bash_todo(
// `name` when the caller passed one, and even the auto-generated socket,
// hex id was already returned to the agent in the `run` tool's own &id,
// result — the todo only needs to say which task, not repeat the format!("bash task `{id}` running: `{}`", task.cmd),
// command. An unbounded raw command (e.g. a multi-line heredoc )
// script) would balloon every UI that renders todo summaries; the .await;
// full command stays on disk in the task file for `status`/`view`
// instead.
upsert_bash_todo(socket, &id, format!("bash task `{id}` running")).await;
// Best-effort: tally the normalised command head for the /stats // Best-effort: tally the normalised command head for the /stats
// "favorite tools" view. Counted once per execution, regardless of // "favorite tools" view. Counted once per execution, regardless of
// exit status. Never fails the task. // exit status. Never fails the task.