Assignments
An assignment is a piece of work you hand to a coding agent from CodeKasten, instead of typing it into a terminal. You write what to do, pick the agent and the repository, and a runner on one of your machines does the rest. It starts the agent in a git worktree of its own, on a branch of its own, and the agent works with nobody at its terminal. When it stops, the work comes back to you to review.
It works with the CodeKasten app, which also keeps your coding sessions. Assignments are yours alone, like your sessions: nobody else sees them, whatever their role.
Assigning
Open the palette (Ctrl+K) on any record, such as a gap, a feature or a ticket, and choose Assign to an agent…. The record becomes what the work is about, and the agent is told to read it. Assign to an agent… also works from anywhere without a record, and so does the Assign button on the Assignments page under For me.
A record's page has an Assignments tab, next to Documents, Links and Files: it lists what you assigned about that record, each opening on the Assignments page, and its Assign button starts a new one about the record. It shows only your own assignments: nobody else sees that you assigned work about the record.
| Instructions | What the agent should do. Its first line is the title unless you give one |
| Agent | Claude Code or opencode |
| Runner | One of your runners, or any of them that has the repository |
| Repository | Which repository it works in. The sheet offers your runners' repositories |
| Without asking | Edit and commit in its worktree (the default), or Read only |
| Budget | The most its session may spend, in dollars. Its grant refuses calls past it |
An assignment waits, Queued, until a runner that can take it asks for work.
While it runs
The agent's session is a coding session like any other. It shows on the Agents page marked Assigned, and its transcript follows it as it works.
Nobody is at its terminal, so what would be asked there is asked in CodeKasten:
- A tool that needs approval (a command outside what the assignment allows, a network call) is asked in your Inbox and on the session's transcript. The agent waits until you answer, for up to 12 hours. If nobody answers, the tool is refused.
- A decision is asked with CodeKasten's
asktool, which also waits in your Inbox.
With Edit and commit, the agent may change files in its worktree and run git's everyday commands (status, diff, log, add, commit) without asking. A repository can add its own commands in .codekasten.json, so that its tests run without a question each time:
json
{ "runner": { "allow": ["bun run test", "bun run typecheck"] } }Reviewing
When the agent stops, the assignment is To review and your Inbox says so. Its page shows:
- what the agent says it did;
- the branch it worked on, its commits and what changed;
- a link to its session.
| You | What happens |
|---|---|
| Accept | It is done. Merge its git branch yourself, or ask an agent to. What it changed in CodeKasten is on its session's branch, which the page offers to open |
| Send back… | Write what is still to do. The same session goes on, on the same branch, with your note as its next prompt |
| Cancel it | It stops. A running agent is stopped at its runner's next beat, within a minute |
| Try again | (a failed one) It is queued again, in a new session |
| Go on… | (a done, failed or cancelled one) Write what to do next. Like a send-back: the same session goes on, on the same branch |
| Add instructions… | (one queued, running or sent back) Your note is added to what the agent is told. A running agent is not interrupted: when its run ends it goes on at once with your note, and comes to you for review after that |
An assignment whose runner has not been heard from for 10 minutes is marked Stalled, and your Inbox says so.
The runner
The runner is a small program in the CodeKasten repository, integrations/runner/. It needs Node and the agents you want it to start (claude, opencode) on the machine. Each repository it works in needs a .codekasten.json and this machine's key for its workspace, as the Claude Code plugin sets them up:
bash
node integrations/runner/runner.mjs ~/code/shop ~/code/siteIt runs two assignments at a time (--max changes that) and names itself after the machine (--name changes that). The worktrees are kept under ~/.cache/codekasten/runner/. One is removed when its assignment is done or cancelled, and its branch is kept.