Skip to content
DocsAll docs
Console

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

NOTE

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.

CommandResult
kodeOpens your desk.
kode acmeOpens the desk of the team acme.
kode --desk devOpens the desk dev.
kode --desk dev --startStarts 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.

CommandResult
/helpShows the keyboard shortcuts and the commands.
/loginLogs in to a model provider.
/modelSets the model and saves it as the default. /model test checks each connected provider.
/filesShows the files and the diffs of the selected workspace.
/deskNames or continues a conversation of the harness.
/compactShortens the context. Text after it says what to keep.
/clearArchives the transcript and shows an empty chat.
/settings, /themeChange the settings and the theme.
/exitQuits. A running turn goes on in the desk.
KeyAction
enterSends the prompt. During a turn, the harness queues it or cuts in with it.
^sCuts in with the prompt during a turn.
escStops the turn when the prompt is empty. In another view, returns to the chat.
^pLists the workspaces and the desk, to go to one.
^f, ^jOpen the Files view and the Jobs view of the selected workspace.
^g, ^qOpen the task boards and the finished tasks.
shift+tabChanges the permission mode: default, acceptEdits, plan, or bypass.
^cQuits.

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-tui is installed next to kode, and you are signed in. See Install kode.
  • References: kode, Desks.

Procedure

  1. Run kode with the desk. Put a team name first for a team desk.

    CLI
    kode acme --desk dev
  2. Add --start if the desk is stopped.

Close-out

  1. 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

  1. Type /login and use enter. Each row names a provider and a method, oauth or api key.

  2. Select a row and use enter. To skip the list, type the provider and the method.

    text
    /login deepseek api_key
  3. Open the URL that the harness shows, and enter the code if it shows one. For api key, paste the key at the prompt.

  4. Type /model, select a model, and use enter. The list shows only the models of connected providers.

Close-out

  1. 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

Procedure

  1. Type the task in the prompt and use enter.

    text
    Run the tests in ~/workspace of the workspace api and fix the first failure.
  2. Read the transcript. It shows the answer and one row for each tool call with its state.

  3. Use esc on an empty prompt to stop a turn that goes the wrong way.

Close-out

  1. Make sure that esc interrupt has 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

  1. Read the card. A Permission required card names a tool and an action, for example workspace with delete, and gives the reason.
  2. Select Allow once, Allow always, or Reject with left and right. Use enter to send it.

Close-out

  1. 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

  1. Use ^p and select the workspace.
  2. Use ^f to open the Files view. The list has the CHANGES against HEAD above the FILES tree.
  3. Select a row with j and k, and open it with enter. Use v to flip a changed file between its diff and its text.
  4. Use ^j to open the Jobs view. Select a process and open its log with enter.
  5. Use esc to return to the chat.

Close-out

  1. Make sure that the title bar names the workspace that you selected.

Troubleshooting

SymptomPossible causeCorrective action
kd-tui is not foundkd-tui is not installed next to kode.Install kode again.
the desk did not open within 90 sThe desk did not start.Open the desk again with --start.
kd-tui: lost the desk connectionThe desk stopped or went idle.Open the desk with --start.
kd-tui could not agree on a protocol with the deskThe 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 rowA 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 failsLogin, desk, tools, or model providers.Run kode doctor. Each check prints one ok, FAIL, or skip line.