Workflows
A workflow is a path an agent follows, one step at a time: sync the branch, run the tests, build, wait for your yes, deploy, check, report. A step is done when its check passes, and Cocobox runs the check command itself, so an agent cannot say a step is done and be wrong. Each workflow is a file, kept in your repo for the whole team or just for you.
Find your workflows
Open the right panel and pick the Workflows tab. Workflows saved in the repo are listed under This repo (
.cocobox/workflows); your own are under Personal (~/.config/cocobox/workflows).
Each card shows its steps as icons, how many are checks, loops and approvals, and how its last run went. A file with a problem shows what is wrong, and its Run button stays off until it is fixed.
Make or edit a workflow
Click New workflow, or Edit on a card. The editor opens with the steps on the left and the selected step's settings on the right.

The editor, with the Smoke check step selected. Add steps with the three buttons under the list:
- Agent step: the agent does it. Write its instructions; you can also give it a command to verify with.
- Check: Cocobox runs a command. The step passes when the command does. Common commands from your project are offered as suggestions.
- Approval: you say yes. The run waits for you with the message you write here.
Reorder steps by dragging a card, or focus a card and press ⌥↑ / ⌥↓. The + between two cards inserts a step there.
For an agent step, set Loops to ask the agent to review and improve its own work. Pass 1 does the work; each further pass reviews it, and Cocobox runs the check after each one. A loop stops early when a pass changes nothing. Up to 5 passes.
Choose If it fails: Ask me, Agent retries (Cocobox sends the failure back to the agent and runs the check again, up to the retries, then asks you) or Stop the run.
Pick This repo or Personal at the bottom, then Save. File at the top shows the file itself, a short TOML file you can also edit by hand.
Start a workflow
In the message box, click the flow button (beside the paperclip), or type / and the workflow's name. Pick one with ↑ ↓ and Enter.

Start a workflow in this tab. The workflow sits in the message box as a chip. Type a note the run should know (optional), then press Enter to start it. The × on the chip removes it.

Or click Run on its card in the Workflows panel, or simply ask the agent to "follow the release workflow".
The first time a workflow runs, and whenever its file changed since you last saw it, Cocobox shows every command it will run, because it runs them itself, as you. Read them, then click Trust and run, or Cancel.

A workflow never changes what a tab may do without asking. One tab runs one workflow at a time.
Follow a live run
A strip at the top of the tab shows the workflow, a box per step, which step is running and how long the run has taken. Stop ends it. The tab's row in the sidebar shows the step too, like
▸ 5/7.
Click View run on the card for every step: its instructions, its check and result, and how long it took. The chat also gets a divider for each step.

The run view shows which checks passed.
Approve, fix, retry or skip
At an approval step the run waits. Click Approve and continue, or Stop here. The card shows the branch and which checks passed. The same buttons appear in the chat, so you can answer with the panel closed.

When a check fails, its card shows the command, the exit code and the end of the output. Choose Ask the agent to fix this, Retry or Skip. To skip, write why: the reason is kept with the run.

A failed, stopped or interrupted run can carry on where it stopped: open it and click Resume from step N. Run again starts over.
When every step is done, a summary shows the total time, steps, checks, retries and who approved. Run again starts a new run.

See past runs
Click the last-run line on a card. Runs lists each run with when it ran, the tab, how long it took and, for a failure, the step that failed. Click one to read it. Steps shows the workflow as it is now.

The newest 50 runs are kept on your Mac. Editing a workflow never rewrites a past run.
Let an agent write one
Ask an agent to set up a workflow ("make a release workflow for this repo") and it saves one with Cocobox's own tool, so it shows in the Workflows panel.
- It runs without you. A workflow an agent made starts with no review. When a tab an agent opened runs a workflow, that agent reviews its commands, decides its approval steps and hears each step pass or fail. With no such agent, the agent running it decides.
- Keep a step for yourself. Write
approver = "person"on an approval step in the file, and it waits for you whoever runs it. - A failure is never a dead end. When a check fails for good, the agent that opened the tab gets the summary and the end of the output, and can retry the check, send the tab back with a note, or skip the step with a reason, which is logged under its name.
- Checks run in your login shell, with the same PATH as your agents, so tools installed with nvm, volta or Homebrew are found.
Share or import a workflow
In the Workflows panel, click Share… on a workflow. You see the exact file that goes out, with secrets, tokens, database URLs, emails and your own paths replaced by placeholders. Copy it or save it, and send it however you like. Nothing is uploaded.
To bring one in, click Import…, paste the file or pick it, or drop the file on the Workflows panel. Nothing runs on import: you approve its commands first, and it cannot run until its placeholders are filled in.
To share one as a link, or to start from a ready one, see The workflow gallery and shared links.