Skip to content

Agent overview

Kodik includes an autonomous coding agent that reads and edits files, runs terminal commands, searches the codebase, fetches URLs, drives the Integrated Browser for visual checks, and calls MCP tools — with every action visible in the chat and requiring your approval (or running automatically if you have configured auto-approve).

The agent operates in one of five modes that determine its behavior and the tools it can use:

ModePurposeEdits files?
Code (default)Executes tasks: reads, edits, runs commandsYes
PlanCreates an implementation plan without changesNo
AskAnswers questions about the codebaseNo
DebugHypotheses → instrumentation → minimal fixYes
EducatorTeaches with explanations and interactive lessonsNo project files

See Modes for full details.

The agent has a set of built-in tools:

  • Reading and navigationread_file, glob, rg (ripgrep), codebase_search
  • Editingedit_file, create_file, delete_file, edit_notebook
  • Terminalshell (run commands), command_status (poll background processes)
  • Networkweb_fetch (HTTPS only)
  • Browserbrowser to open local pages, inspect rendered UI, take screenshots, read console output, and interact with the page
  • Teachingcheck_understanding for quick comprehension checks and create_lesson for educator lessons saved under .kodik/teach
  • Utilitiestodo_write, memory, ask_questions, read_lints
  • Subagentssub_agent to delegate subtasks
  • MCP — any tools from connected MCP servers

The full tool reference is in Tools.

In Plan mode the agent explores the codebase and saves a structured plan via the generate_plan tool without making any changes. Switch to Code to start implementing. See Planning.

Kodik automatically creates a checkpoint after each tool use, saving a snapshot of the workspace in a shadow Git repository. You can roll back to any checkpoint at any time. See Checkpoints.

By default the agent asks for confirmation before every action. You can configure fine-grained permissions — allowing file reads, searches, specific command patterns, and more — while keeping control over edits. In Autopilot mode all actions are approved except commands on the blocked list. See Auto-approve.

If a provider connection fails after Kodik has already shown text, thinking, or tool results, the partial work stays in the chat and is marked interrupted before the retry prompt appears. The retry prompt also includes compact progress context, so you can see what was preserved before starting a new provider attempt.

If the failure happens while a tool or foreground subagent is still running, Kodik stops that work and settles the tool card before showing the retry prompt. Canceling during a permission hook also stays canceled; a late hook result cannot reopen the approval.

While Kodik is silently retrying a transient provider failure, the chat status changes from “Working” to a retrying message with the next attempt and backoff delay, so long waits do not look disconnected.

During long responses, live text and thinking are streamed as lightweight updates, so long chats and split-pane workspaces keep updating smoothly while full snapshots still handle reloads, tools, retries, reconnects, and fallback while the lightweight stream reconnects. Kodik also saves in-progress streaming state periodically, so a restart during a long answer can restore recent partial work without rewriting the full history on every token.

In split-pane workspaces, Kodik keeps the visible pane selection matched to the host-selected chat session. If the host cannot switch sessions, the pane selection rolls back instead of routing the next untargeted chat action to a different session. Session, mode, model-selection, and auto-approval actions report failures back to the chat UI instead of silently treating unapplied changes as successful.

If the model keeps requesting tools past Kodik’s safety cap for one user turn, Kodik stops the tool loop and marks the chat as needing your guidance. It does not offer a Retry button for that state, because retrying would likely repeat the same loop; reply with narrower instructions to continue.

If Kodik restarts while a turn is streaming text or thinking, has already written assistant text but has not finished, waiting for approval, asking an interactive question, running a safe read-only tool, waiting for the model after a tool result, or compacting context, the restored chat no longer shows that old in-progress state as live. Streamed text, thinking, and assistant text from the interrupted turn come back as retryable context, completed tool rows stay visible with a retry path for the missing follow-up, safe read-only tool work can be retried from Kodik’s recorded provider snapshot without rerunning already completed tool results, unanswered question cards come back as read-only context, failed compaction is shown as a compact error, and the interrupted turn offers a retry where possible. Unsafe or incomplete tool work is not replayed automatically.

Queued follow-up messages typed while a turn was running are restored as editable queued drafts after restart.

The agent can delegate isolated subtasks to child agents via the sub_agent tool. The child agent runs in its own context and returns results to the parent. See Subagents.

In Code and Debug mode, the agent can use the Integrated Browser to verify browser-rendered work. It can start a local preview, take screenshots, read the console, resize the viewport, inspect elements, and interact with the page while you watch or take over. See Dev-server detection and Tools.

All file edits appear in the changes panel in the chat. You can accept or reject each file individually and open a multi-file diff viewer. See Reviewing changes.