Kode harness (preview)
Open a desk in the Kode harness, a preview, and direct an agent that works in it.
Last updated
On this page
Overview
The Kode harness is a preview. Its commands, keys, and screens can change from one version to the next.
The Kode harness is the program kd-tui, installed next to kode. kode opens a desk in it, and you direct an agent that works in the desk. The agent has the agent tools of the desk, the Kode skills, and your rights. The harness does not offer the provider anthropic. To work with Claude, use the Claude Code plugin.
| Command | Result |
|---|---|
kode | Opens your desk. |
kode acme | Opens the desk of the team acme. |
kode --desk dev | Opens the desk dev. |
kode --desk dev --start | Starts the desk and its stopped workspaces, then opens it. |
kode picks the desk in this order: --desk, the desk that you last opened with kode -s NAME, your only desk. With more than one desk and none opened, it asks you to choose. With no desk, it creates main with no environment.
The harness splits the work. The agent of the desk creates, starts, stops, and deletes workspaces and environments, and reads no code. The agent of each workspace changes the code of that workspace, and can start subagents in clones of it. The sidebar lists the workspaces of the desk, and a row says needs you when an agent waits for your answer.
While the harness is open and a turn, a tool call, or a client is in use, it sends a hold every 60 seconds. The desk then does not go idle.
Type these commands in the prompt.
| Command | Result |
|---|---|
/help | Shows the keyboard shortcuts and the commands. |
/login | Logs in to a model provider. |
/model | Sets the model and saves it as the default. /model test checks each connected provider. |
/files | Shows the files and the diffs of the selected workspace. |
/desk | Names or continues a conversation of the harness. |
/compact | Shortens the context. Text after it says what to keep. |
/clear | Archives the transcript and shows an empty chat. |
/settings, /theme | Change the settings and the theme. |
/exit | Quits. A running turn goes on in the desk. |
| Key | Action |
|---|---|
enter | Sends the prompt. During a turn, the harness queues it or cuts in with it. |
^s | Cuts in with the prompt during a turn. |
esc | Stops the turn when the prompt is empty. In another view, returns to the chat. |
^p | Lists the workspaces and the desk, to go to one. |
^f, ^j | Open the Files view and the Jobs view of the selected workspace. |
^g, ^q | Open the task boards and the finished tasks. |
shift+tab | Changes the permission mode: default, acceptEdits, plan, or bypass. |
^c | Quits. |
The setting vim changes the keys to a NORMAL and an INSERT mode. /help shows the keys of each mode.
Tasks
Open a desk
Reason for the task
Direct an agent in a desk.
Job set-up
- Access: you. For a team desk, a team member whose access is not paused.
- Agent tool: none; an agent uses the SDK.
- Conditions:
kd-tuiis installed next tokode, and you are signed in. See Install kode. - References:
kode, Desks.
Procedure
Run
kodewith the desk. Put a team name first for a team desk.kode acme --desk devAdd
--startif the desk is stopped.
Close-out
- Make sure that the desk opens. An idle desk wakes during the open.
Sign in and choose a model
Reason for the task
Connect a model provider so that the agent can answer.
Job set-up
- Access: you.
- Agent tool: none; an agent uses the SDK.
- Conditions: the harness is open.
- References: none.
Procedure
Type
/loginand useenter. Each row names a provider and a method,oauthorapi key.Select a row and use
enter. To skip the list, type the provider and the method./login deepseek api_keyOpen the URL that the harness shows, and enter the code if it shows one. For
api key, paste the key at the prompt.Type
/model, select a model, and useenter. The list shows only the models of connected providers.
Close-out
- Make sure that the prompt card names the model.
The harness saves the credentials in auth.json and the model in settings.json, in ~/.config/kode on the host of the desk, not on your computer. A provider that refuses a request with 401 or 403 shows as blocked in /model. Select the row to sign in again.
Give a task and follow the work
Reason for the task
Give the agent a task and watch it work.
Job set-up
- Access: you.
- Agent tool: none; an agent uses the SDK.
- Conditions: a model is connected. See Sign in and choose a model.
- References: Agent tools.
Procedure
Type the task in the prompt and use
enter.Run the tests in ~/workspace of the workspace api and fix the first failure.Read the transcript. It shows the answer and one row for each tool call with its state.
Use
escon an empty prompt to stop a turn that goes the wrong way.
Close-out
- Make sure that
esc interrupthas left the bottom row. The turn is over.
Answer a permission card
Reason for the task
Let the agent continue after it asks you.
Job set-up
- Access: you.
- Agent tool: none; an agent uses the SDK.
- Conditions: a card replaces the prompt.
- References: none.
Procedure
- Read the card. A
Permission requiredcard names a tool and an action, for exampleworkspacewithdelete, and gives the reason. - Select
Allow once,Allow always, orRejectwithleftandright. Useenterto send it.
Close-out
- Make sure that the card has gone and the agent continues.
A permission card shows only for a tool that deletes something, and only when your words in this turn do not name the target. esc rejects the card. Allow always holds for that tool in that conversation until you quit the harness.
Read the changes of a workspace
Reason for the task
See what the agent changed and what runs in the workspace.
Job set-up
- Access: you. You can enter only your own workspaces.
- Agent tool: none; an agent uses the SDK.
- Conditions: the desk has a workspace that runs.
- References: Tool server API.
Procedure
- Use
^pand select the workspace. - Use
^fto open the Files view. The list has the CHANGES againstHEADabove the FILES tree. - Select a row with
jandk, and open it withenter. Usevto flip a changed file between its diff and its text. - Use
^jto open the Jobs view. Select a process and open its log withenter. - Use
escto return to the chat.
Close-out
- Make sure that the title bar names the workspace that you selected.
Troubleshooting
| Symptom | Possible cause | Corrective action |
|---|---|---|
kd-tui is not found | kd-tui is not installed next to kode. | Install kode again. |
the desk did not open within 90 s | The desk did not start. | Open the desk again with --start. |
kd-tui: lost the desk connection | The desk stopped or went idle. | Open the desk with --start. |
kd-tui could not agree on a protocol with the desk | The two programs have different versions. | Install kode again. |
No AI provider connected yet — run /login to connect one. | No provider has a credential. | Sign in. |
/model shows a blocked row | A request of the provider returned 401 or 403. | Select the row and sign in again. |
The user rejected this tool call. | You selected Reject, or used esc on the card. | Give the task again and select Allow once. |
Plan mode: workspace is not available. | The permission mode is plan. | Use shift+tab until the bottom row shows no mode. |
Terminal too small: resize to at least 80×24. | The terminal has fewer than 80 columns or 24 rows. | Make the terminal larger. |
| You cannot tell which part of the set-up fails | Login, desk, tools, or model providers. | Run kode doctor. Each check prints one ok, FAIL, or skip line. |