Multica Docs

Tasks

The unit of work for every agent run, with a clear state machine, timeouts, and retry rules.

A task is the unit of every agent run — assigning an issue to an agent, @-mentioning an agent in a comment, sending a message in chat, or an Autopilot firing on schedule all produce a task. Multica puts it in a queue; a daemon picks it up and hands it off to the corresponding AI coding tool, then writes the result back to the server when it finishes.

Tasks and issues are two different objects. A single issue can be assigned, @-mentioned, and manually rerun many times — each produces a new task.

The states a task goes through

Rendering diagram…
  • Queued — the task was just created and is waiting for a daemon to pick it up
  • Dispatched — a daemon has claimed it and is starting the AI coding tool
  • Running — the AI coding tool is actually doing the work
  • Completed — finished successfully; the output (comments, code commits, status changes) is written back to the server
  • Failed — aborted with an error or timeout; if the failure reason is retryable, the task automatically returns to queued for another attempt
  • Cancelled — the user cancelled it

What happens when a task times out

The Multica server scans every 30 seconds. Two kinds of timeout trigger a failure:

SituationTimeout
Dispatched but never started (daemon picked it up but didn't launch the AI tool)5 minutes
Running too long2.5 hours

Both timeouts use failure reason timeout and retry automatically (next section). For the related runtime-missing check, see Daemon and runtimes → When a runtime is marked offline.

Which failures retry automatically, which don't

Failures fall into two categories: retryable and non-retryable.

Retryable (Multica automatically requeues):

  • runtime_offline — the daemon went missing after the task was dispatched
  • runtime_recovery — the daemon crashed and restarted, reclaiming tasks it didn't finish
  • timeout — runtime or dispatch timeout

Non-retryable (the task stays in failed):

  • agent_error — the AI coding tool itself reported an error (API error, quota exceeded, internal bug). Underlying problems aren't retried — that would loop forever.

Automatic retry also has two extra conditions:

  1. At most 2 attempts — 1 original + 1 retry. If the retry also fails, no further retries, even if the reason is retryable.
  2. Only for issue- and chat-triggered tasks — Autopilot-triggered tasks do not retry automatically.

Autopilot tasks don't retry automatically by design. An Autopilot has its own firing cadence (e.g. daily); automatic retries on failure would overlap with the next scheduled run. If you need an immediate re-run after failure, use a manual rerun (next section).

How you'll know an Autopilot task failed: a notification lands in your Inbox, and the associated issue's status reverts from in_progress back to todo. The Autopilots page also shows the latest run result per autopilot.

Manual rerun vs. automatic retry

A manual rerun is one you trigger from the CLI or the API (POST /api/issues/{id}/rerun):

multica issue rerun <issue-id>

Behavior:

  • By default, targets the issue's current agent assignee — useful when you want the rerun to follow the current assignment regardless of who ran the prior task.
  • The execution-log retry button on a specific row sends that row's task ID alongside, so the rerun targets the agent that ran that exact task — not the current assignee. This makes per-row retry meaningful for squad workers, parallel @-mention agents, or rows whose agent has since been displaced by a reassignment.
  • Cancels the target agent's queued or running task on this issue (if any). Tasks owned by other agents on the same issue (e.g. parallel @-mention runs) are left alone.
  • Creates a brand-new task — attempt count resets to 1, even if the original task hit the attempt ceiling.
  • Starts a fresh agent session — the prior session ID is not inherited. A manual rerun means you've judged the previous output bad, so resuming the same conversation would replay the same poisoned state. (Automatic retry, by contrast, does inherit the session — that path is for infrastructure failures, not bad output.)

Comparison:

DimensionAutomatic retryManual rerun
TriggerSystem, based on failure reasonYou, manually
Ceiling2 attemptsNo limit
Applicable sourcesIssues, chatIssues with an agent assignee
Agent pickedSame agent as the failed taskSource task's agent (UI per-row retry) or issue's current assignee (CLI / no task_id)
Session inheritanceYes (resumes prior session)No (fresh session)

How a failed task affects issue status

If an issue-triggered task fails (and no automatic retry succeeds) because the issue was assigned to an agent, the issue's status automatically rolls back from in_progress to todo — so when you open the board you immediately see "this one needs another look." See Issues and projects.

Can a task continue from the previous context

Yes — as long as the AI coding tool supports session resumption.

Multica pins the session ID twice during a task: once at the start (when the AI tool returns its first system message), and once at the end (on completion or failure). The first lets the daemon recover if it crashes mid-run; the second is reserved for the next automatic retry, where that ID is passed back so the agent can pick up the previous conversation and file state. Manual rerun deliberately skips this and starts a fresh session — see Manual rerun vs. automatic retry.

But which AI coding tools actually support this varies a lot:

  • Real support — Claude Code, Copilot, Hermes, Kimi, Kiro CLI, OpenCode, OpenClaw, Pi
  • ⚠️ Code exists but unusable — Codex, Cursor
  • No support — Gemini

See Providers Matrix → Session resumption.

Next