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).

Manual rerun vs. automatic retry

A manual rerun is one you trigger from the UI or CLI:

multica issue rerun <issue-id>

Behavior:

  • Cancels the currently running task (if any)
  • Creates a brand-new task — attempt count resets to 1, even if the original task hit the attempt ceiling
  • Inherits the previous session ID; if the corresponding AI coding tool supports session resumption, the new task continues from the previous context

Comparison:

DimensionAutomatic retryManual rerun
TriggerSystem, based on failure reasonYou, manually
Ceiling2 attemptsNo limit
Applicable sourcesIssues, chatAll sources
Session inheritanceYesYes

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 future reruns. On the next rerun or automatic retry, that ID is passed back so the agent can pick up the previous conversation and file state.

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

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

See Providers Matrix → Session resumption.

Next