Repository navigation
acpmux: tasks: give a session a task, end it with a typed result in one call, list a chat's tasks - #24992
Conversation
…ne call, list a chat's tasks acpmux task new SESSION TITLE writes a brief for a session on this daemon (dispatch starts a new one) with the giver's session id, and sends the lane the brief with the task id and its one-call finish first. acpmux task done|blocked|failed ID --summary [--pr] [--sha] [--why] extends _acpmux/report with a checked result; the result comes back to the giver once, as the lane's card (provenance task_result). acpmux task ls lists the tasks a chat gave, open first, with each lane's state now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16c8c-54ec-71b2-a0fa-125d1404dd72&host=big-red
…omeone else ended names them Codex review: a connection with no caller could end a task, and a Web or peer one proves no session, so its result would read as the lane's own card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16c8c-54ec-71b2-a0fa-125d1404dd72&host=big-red
…ore claiming; keep a card not delivered and send it again on retry Codex review of d2121a8 (BLOCK, three P2s): - the replay check ran on a stale row, so two reports at once could both send a card; it now runs under the ledger's lock - an invalid fromAgent was refused after the task was claimed, leaving a starting row; it is checked first - a card that failed to send was only logged; the row now says result.undelivered and why, task ls shows it, and the same call again sends it again Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16c8c-54ec-71b2-a0fa-125d1404dd72&host=big-red
… late send failure marks only its own result Codex review of cf1b618 (BLOCK, two P2s): - the lastReportKey replay ran before the undelivered check, so a retry with an idempotencyKey replayed forever - a send failure marked whatever result the task had by then; it now marks only the result it sent (its at) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16c8c-54ec-71b2-a0fa-125d1404dd72&host=big-red
|
Owned by hb-acpmux on big-red · session |
|
Bead |
|
Found 35 test failures on Blacksmith runners: Failures
...and 25 more test failures. View all on Blacksmith: run 40139446261, run 40139446238
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Part 1 of goal 8 in the design doc (leo-workspace research/2026-10-24-acpmux-tasks-liveness-urgency.md, leo-workspace#1010): task state with typed results, and
acpmux task ls.Leo, 2026-10-24: "shouldn't you be able to tell more metadata regarding... when things are completed, when things are not completed?"
What it does
acpmux task new SESSION "title" [--stop "done when"] [brief](_acpmux/task_new): gives a session on this daemon a task. The task is a brief in the existing ledger (dispatch.rs,kind: "task") that records the giver's session id (fromSession). The lane gets the brief as the giver's message (thesession_messagechip), with the task id first and the one call that ends it.acpmux task done|blocked|failed ID --summary "one line" [--pr URL]... [--sha SHA]... [--why …]extends_acpmux/reportand does not duplicate it.hub/tasks.rschecks the result: the summary is one line of at most 300 characters;whyis required unless the state is done; PRs are https URLs; SHAs are 7 to 40 hex digits. A bad result is refused withtask.result_invalid. Only the task's own session or the chat that gave it can end it (task.not_yours). Sending the same call again is a replay (replayed: true) and gives one result and one card. The person on this machine (its socket) may also end a task; a Web or peer connection, which proves no session, may not. When someone other than the lane ends a task, the card saysEnded by: NAME. The replay check runs under the ledger's lock, so two identical reports at once send one card. A card that can't be delivered (the giver is gone, or the prompt is refused) stays on the row asresult.undelivered;task lsshows it, and the same call again sends it again.task_result {from, fromName, to, taskId, state}. The chat draws it as the lane's sender card, and the card opens the lane. No card is sent when the giver ended the task itself.acpmux task ls [--from NAME | --all] [--open](_acpmux/tasks): lists the tasks this chat gave, open ones first, with each lane's state now and each result's summary.task-resultvariant (RemoteSender.gallery.ts).blockedstays open, so the giver can end the task once it is unblocked. Not in this PR, each in its own later PR: tasks for a peer's session, liveness (a lane that closes with its task still open), urgency boxes, and the coordinator sweep.Size
About 1,030 changed lines, over the ~800 guideline. About 400 of them are tests, the gallery variant, and the regenerated protocol spec and methods.ts; the code itself is about 615 lines. The brief handlers were moved out first, as their own PR (#24970), so
server/requests.rschanges by only 7 lines here. Splitting the CLI from the RPC would land atask_newnobody can call.Tests (huge-blue)
tests/hub_integration/tasks.rs, witha_task_brings_its_typed_result_back_to_the_chat_that_gave_it_oncea_blocked_task_says_why_and_a_task_is_given_only_to_a_session_here(also: Web and Peer are refusedtask.not_yours, red without the fix; and the person's own result saysEnded by:)two_reports_at_once_send_one_card_and_a_card_not_delivered_is_kept_and_sent_again(red on the earlier head: a refused sender name left astartingrow)hub::tasksunit tests and the webview testincomingMessage.test.ts("a task's result is its lane's message, and opens the lane").protocol_registry_names_every_served_method(_acpmux/unknown), is red on base as well. clippy, cargo fmt, vp fmt, typecheck and bun (33) are clean.protocol_ir_is_current,acpmux-protocol:codegen).Capture
No capture: the only visible change is that a task's result draws as the lane's existing sender card, unchanged, and that card opens the lane. Showing it in the app takes a live acpmux daemon with two chats, and the capture minis run with no agent backend (the agent-pane tour marks chat as optional). The gallery's new
task-resultvariant (RemoteSender.gallery.ts) shows the card, and gallery visual evidence captures it. The real-chat end-to-end check is on Leo's machine once the nightly carries this.Review
Codex xhigh via acpmux (session
review-24939on huge-blue): SHIP at 54a3db8, after four rounds. It found that a Web or peer connection could end a task (fixed:task.not_yours); that two reports at once could send two cards; that a refused sender name left a claimed row; that a card that failed to send was only logged; and that keyed retries of an undelivered card, and late send failures, misbehaved. Each of these has a test.Agent session: big-red
🤖 Generated with Claude Code