Multica Docs

Tasks

How a single agent run is queued, runs, stops, and retries.

Every time an agent starts working, Multica creates a task. It records what triggered the run, which agent it went to, how far it has progressed, and whether it ultimately succeeded.

Issues and tasks

An issue holds the goal, discussion, assignee, and final status of a piece of work; a task records one agent run against that work.

IssueTask
What it recordsA piece of work moving forwardOne agent run
How long it lastsCan be discussed, amended, and reassigned repeatedlyFrom trigger until completion, failure, or cancellation
CardinalityOne issue can span many runsEvery run gets its own record

So the same issue can be handed to different agents in turn, or run again after a failure. Each run produces a new task; earlier records are never overwritten.

Trigger sources

Any of the following can trigger a run:

  • Assigning an issue to an agent or a squad.
  • Mentioning an agent in a comment.
  • Sending a message to an agent in chat.
  • An Autopilot firing on a schedule or from an external event.

Different entry points provide different context, but execution works the same way: Multica creates a task, a runtime claims it, and the runtime invokes the AI coding tool the agent is configured with.

Execution lifecycle

A task typically moves through these states:

StateMeaning
deferredScheduled to fire later; enters the queue at the appointed time
queuedWaiting for a runtime to claim it
dispatchedA runtime has claimed it and is starting the AI coding tool
waiting_local_directoryThe target local directory is held by another run; waiting for the directory lock to release
runningThe AI coding tool is executing
completedThe run finished normally
failedThe run errored or was interrupted
cancelledThe run was stopped manually

When the runtime is online, a new task usually starts quickly; if the runtime goes offline after the task enters the queue, the task stays queued until it recovers. A task left unclaimed for more than 2 hours ends as failed.

If the system already knows the target runtime is offline before triggering, some immediate actions report that the run cannot start right now instead of creating a task nothing can claim.

A runtime with a healthy heartbeat can execute long tasks; the server never force-ends a run just because it has been running for a while. The runtime decides whether the process has stalled based on actual activity; see Environment variables for the relevant settings.

Viewing run history

Open an issue and go to the Execution log to see every task it has produced. Each row shows the trigger source, the executing agent, the state, and timing.

From here you can:

  • Open a run record to see the agent's messages, tool calls, and error output.
  • Stop tasks that are deferred, queued, starting, waiting for a local directory, or running.
  • Retry a failed or cancelled task.

Run record: status timeline, agent summary, and individual tool calls

Changing an issue's assignee or status does not stop a run that has already started. To interrupt one, stop the corresponding task in the execution log. Active tasks are cancelled along with an issue only when the issue is deleted.

Failures and automatic retries

Transient faults — a runtime going briefly offline, a daemon restart, an execution timeout, or a network interruption in the AI coding tool — can trigger an automatic retry. A regular task runs at most twice by default; tool network interruptions get up to three attempts.

Errors returned by the agent itself are usually not retried automatically. Expired credentials, exhausted quota, misconfiguration, or a model unable to complete the request all need the cause fixed first, followed by a manual retry.

An Autopilot's run only mode does not retry automatically, to avoid overlapping with the next scheduled run. The create issue mode produces regular issue tasks, so infrastructure failures still retry under the rules above. Both modes show their final result in the Autopilot run history.

When an issue has no other active task and no new retry waiting to run, a failure moves an in_progress issue back to todo.

Failure reason reference

The failure reasons shown in the execution log and usage stats fall into two groups: unprefixed reason codes are recorded by the platform; agent_error.* codes are classified from the AI coding tool's own errors.

Platform side

ReasonMeaningWhat to do
runtime_offlineThe runtime went offline during the runRestore the runtime and retry; see Daemon and runtimes
queued_expiredQueued for over 2 hours with no runtime claiming itConfirm the runtime is online, then retry
runtime_recoveryThe daemon reclaimed an interrupted run after restartingRetry directly
cancelledStopped manually, or cancelled along with an archive or deleteNothing to do
timeoutExceeded the daemon's configured execution time limitNarrow the issue scope, or adjust the daemon's agent_timeout
iteration_limitHit the iteration cap for a runNarrow the issue scope
agent_blockedThe agent reported it cannot proceedProvide what its comment asked for
api_invalid_requestThe platform API rejected an invalid requestRetry; report the problem if it recurs
codex_semantic_inactivityCodex produced no meaningful output for too long and was judged stalledRetry, or adjust the Codex inactivity timeout

Tool side (agent_error.*, prefix omitted)

ReasonMeaningWhat to do
provider_auth_or_accessModel provider authentication failed or access denied (401/403)Sign in again in that AI coding tool, or check the API key
provider_quota_limitQuota or balance exhausted (402)Top up or switch accounts
provider_capacity_or_rate_limitRate limited or out of capacity (429/529)Retry later
provider_server_errorModel provider server error (5xx)Retry later
provider_networkNetwork failure reaching the model providerRetries automatically; check the executing machine's network if it persists
model_not_found_or_unavailableThe model does not exist or is currently unavailablePick an available model in the agent settings
context_overflowContext exceeded the model windowNarrow the issue scope or reduce the input
missing_configRequired configuration such as an API key is missingFill in the agent's environment variables or the tool configuration
runtime_missing_executableThe AI coding tool's executable was not foundReinstall the tool; see Install AI coding tools
runtime_version_unsupportedThe AI coding tool version is too oldUpgrade the tool
process_failureThe tool process exited abnormallyCheck the run record to locate the cause, then retry
empty_or_unparseable_outputThe tool produced no output, or output that could not be parsedRetry; check the tool installation if it recurs
agent_timeoutThe tool was terminated after going unresponsive for too longRetry or narrow the issue scope
unknownUnclassified failureCheck the raw error in the run record

Manual retry

Clicking the retry button on a row in the execution log invokes the agent that ran that task at the time. Even if the issue has since been reassigned, the retry does not switch to the new assignee.

A retry keeps the files the previous run already wrote to the local directory whenever possible. If the original session is still safe and the same runtime claims the retry, it also continues the previous session. Errors that poison the session, such as context overflow or invalid requests, start a new session on top of the original working directory instead. When the original directory no longer exists, a fresh working directory is used.

You can also rerun the current issue from the CLI:

multica issue rerun <issue-id>

This form does not point at a specific past task, so it uses the issue's current agent assignee and starts with a fresh session and working directory.

Task completion and issue completion

completed only means this particular run ended normally — it does not confirm the issue's goal has been met. You can still review the result, keep discussing, add requirements, or trigger the agent again.

Whether an issue is done is judged by the actual progress of the work and the issue's status.

State and timeout quick reference

The numbers below reflect the server's default configuration, for quick cross-checking while troubleshooting.

StateMeaningTimeout and consequence
deferredScheduled to fire laterEnters queued at the scheduled time, then the rules below apply
queuedWaiting for a runtime to claim itFails after 2 hours unclaimed; not retried automatically
dispatchedClaimed; the tool is startingTreated as failed after more than 5 minutes in this state
waiting_local_directoryWaiting for the local directory lock to releaseNo timeout of its own; returns to the startup flow once the directory is released
runningThe AI coding tool is executingNo fixed duration cap; liveness follows the runtime heartbeat — one every 15 seconds; a runtime that loses its heartbeat is marked offline within about 3 minutes at the latest, and its tasks fail with it

Automatic retry covers only the transient faults below, and only applies to tasks attached to an issue or a chat (excluding the Autopilot run only mode):

Auto-retryable failure reasonAttempt ceiling
Runtime offline2 by default (first run + 1 retry)
Reclaimed after a daemon restart2 by default
Platform-judged execution timeout2 by default
Codex stalled with no meaningful output2 by default
Skill bundle download failure2 by default (the agent process has not started at this point; already-downloaded bundles come from the local cache)
Tool network interruptionUp to 3; the final attempt starts after a delay of about 5 seconds

All other failure reasons (auth, quota, configuration, model, and so on) never retry automatically; fix the cause first, then retry manually.

Next steps