Workflows
A workflow is a reusable multi-step plan for agents. You draw the steps on a canvas, give each one a prompt, an agent and permissions, and connect them with dependencies, branches and loops. Then you run it for a task, on a schedule, or let a spec drive it.
When to use a workflow#
Use a workflow when the same kind of work happens more than once, or when one agent turn is not enough: investigate, then implement, then review; or write a document, wait for your approval, then continue. Each step hands its output to the next. Steps can pause for you, retry on failure and loop back for another round.
A workflow is a definition. Each run of it has its own state and results, so editing a workflow never changes runs that already happened.
flowchart TD
T([Run Workflow on a task]) --> W["New worktree, branch izcode/flow/task"]
W --> A[Agent step]
A --> H{Human step}
H -- Approve --> B[Next agent step]
B -. Loop-back .-> A
B --> C{Anything changed?}
C -- Yes --> R([Commits on the branch to review])
C -- No --> X([Worktree and branch removed])The Workflows view#
Open Workflows in the Activity Bar. At the top, choose the scope:
- Project: workflows saved in the open project, used by its tasks and specs.
- Entire IDE: personal administrator flows that do not belong to any project (see IDE-wide flows below).
The project list has New Workflow, a favorites tab (click a flow's star to add it) and Restore deleted flows. Deleting a flow only hides it; you can restore it later or delete it for good from the deleted list.
Build a workflow#
- Create it Choose New Workflow and enter a Workflow name. The editor opens with a canvas in the middle and an inspector on the right.
- Add steps Choose Add Step for each step. Select a step to configure it in the inspector: name, Executor, agent and model, prompt and permissions.
- Connect the steps Pick a drawing mode, then drag between steps: Dependency (this step runs after that one), Branch (go to a step when a condition holds) or Loop-back (go back to an earlier step).
- Write the prompts
In a step's prompt, type
@to reference a skill or/to reference a Markdown file in the project. References are expanded when the step runs, so the step always sees the file's current content. Use{{<step id>.output}}to pass the output of a dependency, or{{previous}}when the step has exactly one dependency. - Publish
Changes are saved automatically as a draft. Choose Publish to save a numbered version (
v1,v2, …). Runs and automations use the latest published version; a flow that was never published runs its draft.
Step types#
| Executor | What the step does |
|---|---|
| Agent | Sends the prompt to the chosen agent and model in a new session. |
| Human | Pauses the run until you decide. You get a Workflow needs you notification and choose Approve or Reject, optionally with a note for the next step. |
| Spec phase | Runs one phase of a spec: write requirements, design or tasks, analyze requirements, sync tasks with the code, implement the tasks, verify correctness properties or security hardening. Set the spec to {{task.slug}} to use the spec linked to the run's task. See Specs. |
Step settings#
| Setting | Options |
|---|---|
| Permissions | Inherit (default), Read-only (deny writes), Require approval to run, Auto allow agent actions. The agent's own permission checks still apply on top. |
| Expected output | Free text (default), Only true / false, Create a JSON file, Custom JSON response with named fields of type Text, Number, Boolean or List. |
| Retry | Number of attempts, plus Ask a human if it still fails. |
| Timeout | Minutes before the step is stopped. |
| Conditional branches | When a condition holds, Go to one or more steps. Conditions: Always, Output contains, Output matches regex, Output equals, JSON field equals, JSON field exists. |
| Loop back | Back to an earlier step While a condition holds, up to Max iterations. |
| Layout | Card size and color on the canvas. |
Run a workflow#
Workflows run from a task. Open the task on the Tasks board, pick a workflow and choose Run Workflow. You can also choose Auto-create flow: a chat opens with the task attached, the agent proposes a flow, and you review the diagram and choose Apply to task, Apply and run or Reject.
The run view shows every step with its state (pending, running, waiting for you, completed, failed, skipped), its attempts and iterations, the prompt, the output and the tool calls. From there you can:
- Pause: the steps running now finish, then the run waits until you choose Resume.
- Cancel the run. Steps that already finished keep their results.
- Answer Human steps with Approve or Reject.
- Open the agent session of a step with Open Session.
Runs work in their own Git worktree#
When a task's workflow runs in a Git repository, it does not touch the checkout you have open. The run gets its own Git worktree, outside your project, on the branch izcode/flow/<task>. When the run ends:
- if it changed nothing, the worktree and its new branch are removed;
- otherwise its changes are committed on that branch for you to review and merge;
- if something fails (for example a commit hook refuses), the worktree is kept so you can look at it.
Running the same task's workflow again continues on the same branch. A folder that is not a Git repository, or has no commit yet, runs in place. To turn isolation off, set izcode.workflow.taskIsolation to "live" in your user settings. A project's own settings cannot turn it off.
Run on a schedule#
Settings → Task Manager → Automation agent runs one of the project's flows on a schedule, without a task. Choose the Flow, the agent that runs every AI step, and a Schedule: Repeating (every few minutes or hours) or Fixed time (once a day). Human steps still wait for you.
IDE-wide flows#
Switch the Workflows view to Entire IDE and choose New IDE flow. An IDE flow uses one agent for the whole flow and receives a snapshot of the projects, tasks and agent sessions open in the app, so it can, for example, review every running task and summarize failures. Schedule it Once, Every N minutes or Daily at a fixed time, optionally limited to allowed days and hours, or use Run now. With Observe sessions of running tasks across the IDE on, it checks task sessions every minute and opens separate read-only support sessions for new problems.
Results of IDE flows are temporary: only the flow, its schedule and the time of the last run are saved.
Settings#
| Setting | Values | Default |
|---|---|---|
izcode.workflows.enabled (Enable Workflows) | true, false. Off hides the view; saved workflows are kept. | true |
izcode.workflow.taskIsolation | "worktree", "live". User settings only. | "worktree" |
izcode.tasks.automation.enabled | true, false | false |
izcode.tasks.automation.mode | "interval", "daily" | "interval" |
izcode.tasks.automation.intervalMinutes | 5, 15, 30, 60, 360, 720 | 60 |
Tips and limits#
To share workflows with your team, see Team tasks.