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| State | Meaning |
|---|---|
draft | A draft has been generated and is waiting for user confirmation. create_task renders a confirmation card in the chat. |
dispatched | The user confirmed and dispatched the task. MindMux immediately hands it to the selected execution channel. |
running | The task is being executed by an external agent. Applies to local agent channels such as Claude Code / Codex. |
closed-success | The task completed normally. |
closed-failed | Execution failed. |
closed-cancelled | The user cancelled or aborted the task. |
The
draftstate exists in the schema, but the currentcreate_taskflow 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
- Discuss a concrete action in chat ("implement X", "fix Y").
- The agent calls
create_taskto generate a draft based on the current discussion. - A task confirmation card appears in chat, showing the goal, brain pages, channel, and isolation mode.
- After the user confirms, the task immediately enters
dispatched.
Execution channels
Currently supported channels:
| Channel | When to use | Isolation | Takeover |
|---|---|---|---|
| Claude Code | Concrete actions that require writing code / running commands | git worktree (branch mindmux-task/<short>) | Click Resume in Terminal in task details to resume claude --resume <id> |
| Codex | Concrete actions that require writing code / running commands | Depends on TaskType config | Watch 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
runningstatus 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.