Durable goals
Goal runners
How tamux plans, dispatches, supervises, replans, and learns from long-running objectives.
What goal runs do
- Accepts a high-level objective from the UI or tool layer.
- Uses the built-in daemon agent to generate a structured plan.
- Converts executable steps into child tasks on the daemon queue.
- Monitors retries, failures, approvals, and completion.
- Reflects on the final trajectory.
- May write durable memory and generate a reusable skill.
Run lifecycle
| State | Meaning |
|---|---|
queued | The daemon accepted the goal but planning has not started. |
planning | The runtime is building the initial structured plan. |
running | Execution is active or waiting on child-task progress. |
awaiting_approval | A child task hit an approval boundary. |
paused | Orchestration is paused by the operator. |
completed | Steps finished and the final reflection was recorded. |
failed | The run exhausted replanning or failed irrecoverably. |
cancelled | The operator cancelled the run. |
Step-level status is tracked separately with pending, in_progress, completed, failed, and skipped.
Launch surfaces
Goal runs are launched from daemon clients, and richer Mission Control-style preflight is still evolving. What is already shipped is the durable goal object itself plus client surfaces that can expose the requested outcome, provider/model choices, role roster, and inherited defaults before or after launch.
- Goal prompt: what the run is trying to accomplish.
- Primary agent: the main provider/model/reasoning choice.
- Role assignments: which runtime roster will be used for planning and execution.
- Preset source: whether the roster came from prior snapshot state or current main-agent inheritance.
Visibility today
Goal overview
Status, current step, approvals, and run controls.
Execution feed
Live tool calls, file updates, messages, errors, and TODO changes.
Thread router
Open the active execution thread while preserving a “return to goal” path.
Steps & dossier
See step-level history, evidence, reports, and run-level summaries.
During a run, Goals stays the orchestration surface and Threads stays the conversational surface. In the TUI this already includes a real goal workspace with goal, files, progress, active-agent, threads, and needs-attention modes; richer desktop goal shells continue to mature around the same daemon state.
Queue integration
Each executable plan step becomes a child task. Those tasks inherit the normal daemon machinery:
- lane scheduling
- session affinity
- retry policy
- approval waiting state
- managed terminal execution
- queue visibility and control
This design keeps goal runners consistent with the rest of tamux instead of inventing a separate execution runtime.
Approvals and replanning
When a child task hits an approval gate, the task enters awaiting_approval and the goal run surfaces the same blocked state. Once the operator resolves the approval request, work resumes.
When a child task fails, the goal runner records the failure and decides whether to replan. If replanning budget remains, the daemon asks for revised remaining steps. If not, the run becomes failed.
Durable outputs
On successful completion, goal runners can produce two especially important durable outputs:
- Memory update: appended only when a stable fact, operator preference, or durable strategy hint is identified.
- Generated skill: a procedural artifact derived from a successful trajectory.
The structured run history itself stays persisted in SQLite while the editable memory and skill artifacts remain on disk.
When to use goals
- The task will take multiple steps.
- You want approvals and child-task visibility.
- You want work to survive closing a client UI.
- You want reflection, reusable skills, or durable memory from the result.
Use a normal chat turn when the task is short, disposable, or only needs reasoning rather than durable orchestration.
First goal ideas
Build investigation
Investigate a failing build, identify the root cause, propose the smallest safe fix, and capture the workflow as a skill.
Release readiness
Assemble a release checklist, verify packaging outputs, and summarize blockers before shipping.
Research synthesis
Collect, compare, and summarize domain information into a durable artifact with follow-up goals.