Docs

Task Lifecycle

MindMux tasks are lightweight execution objects created from converged discussion. MindMux produces and dispatches tasks, but does not execute them itself.

What counts as a task

Something the current conversation agent can complete directly → not a task (e.g., creating an issue, checking a PR, posting a comment via a one-shot MCP call).

Something that needs a long-running agent in a worktree, extensive code editing, or an isolated context → this is a task.

Lifecycle

The core task state machine is:

draft → dispatched → running → closed-success
                            ↘ closed-failed
                            ↘ closed-cancelled
StateMeaning
draftA draft has been generated and is waiting for user confirmation. create_task renders a confirmation card in the chat.
dispatchedThe user confirmed and dispatched the task. MindMux immediately hands it to the selected execution channel.
runningThe task is being executed by an external agent. Applies to local agent channels such as Claude Code / Codex.
closed-successThe task completed normally.
closed-failedExecution failed.
closed-cancelledThe user cancelled or aborted the task.

The draft state exists in the schema, but the current create_task flow is "confirm in chat → dispatch immediately", so users do not see drafts lingering in the task list. The draft path is reserved for a future "manually create task" UI.

Creation flow

  1. Discuss a concrete action in chat ("implement X", "fix Y").
  2. The agent calls create_task to generate a draft based on the current discussion.
  3. A task confirmation card appears in chat, showing the goal, brain pages, channel, and isolation mode.
  4. After the user confirms, the task immediately enters dispatched.

Execution channels

Currently supported channels:

ChannelWhen to useIsolationTakeover
Claude CodeConcrete actions that require writing code / running commandsgit worktree (branch mindmux-task/<short>)Click Resume in Terminal in task details to resume claude --resume <id>
CodexConcrete actions that require writing code / running commandsDepends on TaskType configWatch the real-time event stream in the task panel

Isolation modes

For coding tasks, the supported isolation modes include:

  • worktree: a separate git worktree that does not affect the main workspace.
  • tempdir: a temporary directory, suitable for tasks that produce out-of-tree files (e.g., artifact tasks).
  • inplace / direct: executes directly inside the workspace.

The exact options available depend on the TaskType definition.

Status feedback

MindMux does not bidirectionally sync external channels, nor does it run background polling or webhooks:

  • Local agent channels stream running status back in real time via process events.
  • Terminal states are confirmed when the user manually refreshes the task panel.
  • The external channel remains the source of truth.

Storage

Task data lives in project-local runtime state and includes:

  • task indexes
  • task metadata
  • dispatch logs
  • runtime event streams
  • local working directories used for isolated execution, when applicable

Task data does not go into brain/ and is not tracked by git.

Important boundaries

  • MindMux does not execute tasks. All execution is delegated to external channels.
  • It does not bidirectionally sync fields with external channels.
  • It does not run background polling or webhook listeners.
  • It does not embed a terminal, kanban board, or dependency graph. Tasks are not a project management tool.
  • Discussion should happen before the task, not inside it.