Running work
How work moves from prompt to merged change, and the three ways it starts.
Machine does work inside a session: a branch and a sandbox for one unit of work. A session ends when its change request (CR) merges back to the default branch. This page walks through the loop, then shows the three ways a session can start.
Sessions
Change requests
Runtime
What happens when a session starts
- Machine creates the session row and cuts a branch from the default branch. The branch name is the session id.
- Machine resolves a sandbox image: the default image, or your own
.kortix/Dockerfileif the manifest declares one. - The sandbox boots. Its daemon,
kortix-agent, clones the repo to/workspace. It starts OpenCode REST. Session status becomesrunning. - The agent works. It reads secrets as environment variables, then commits and pushes to the session branch.
- The agent opens a change request. You review it and merge it — the only way work reaches the default branch.
Git is the durable record for your code
Stopping a session pauses the sandbox but keeps its files, and the conversation stays readable from a saved copy while the sandbox is off. Deleting a session destroys the sandbox and its saved conversation for good. Only work committed and pushed to the branch survives a delete, and only a merged change request makes it permanent. See what stop and delete keep.
Three ways work runs
A session starts one of three ways.
| Mode | How it works |
|---|---|
| On-demand | You ask in chat and get the result now. |
| Human-assisted | The agent works and checks in with you for the calls that matter. |
| Automated | A trigger — a schedule or webhook — starts the session end to end. |
