Compare commits

..

View file

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