Kaitoi Code: AI coding agent for VS Code
The coding agent that also makes the media your app needs. Ask for a
feature and Kaitoi Code writes the code, then generates the images, video,
audio or 3D models it calls for, all from one chat.
Bring the plan you already pay for. Run Kaitoi Code on your ChatGPT
subscription through Codex, use Kaitoi's hosted models on one bill, or stay
fully local with Ollama, LM Studio or vLLM and no account.
- Your ChatGPT plan: Codex as the main agent, billed to your own subscription. Kaitoi's tools, such as media generation, use Kaitoi credits.
- Review every change in VS Code's diff editor, then approve or deny it with a button.
- Generate assets in place: images, video, audio and 3D models, saved into your project (with a Kaitoi account).
- Plan, Build or Crew: read-only answers, supervised edits, or hand a large task to a Crew run.
- Undo a whole turn, restore checkpoints, and resume any session in the terminal with
kaitoi code --resume.
New here? Run Welcome: Open Walkthrough and pick Get started with Kaitoi Code.
The extension is a thin client: Kaitoi Code itself (its models, tools,
permission rules and sessions) runs in the Kaitoi CLI on your machine, the
same kaitoi code you use in a terminal.
Requirements
- VS Code 1.95 or later.
- The Kaitoi CLI, with editor support (
kaitoi code acp). Install it from
kaitoi.io. If yours is older, the chat says so: run
kaitoi update.
- A Kaitoi account for hosted models, or a local model server such as Ollama,
LM Studio or vLLM to use Kaitoi Code without one. Hosted usage is billed at
provider cost to your Kaitoi account; local models are not billed.
- A trusted workspace. Kaitoi Code reads and edits the files of the open
folder, so the extension does not run in Restricted Mode.
Getting started
- Open a folder and trust it.
- Click the Kaitoi Code icon in the activity bar. The chat starts Kaitoi Code
and a session in the folder.
- Type a request and press Enter (Shift+Enter adds a line).
If you are not signed in, the chat offers Sign In, which opens your
browser to log in to Kaitoi. To work with a local model instead, set
Kaitoi Code: Provider to local:ollama (or another local provider) and
Kaitoi Code: Model to a model you have pulled, then start a new session.
In the chat
The title: the chat's header reads Kaitoi Code: , where the
title is the conversation's first message or the name you gave it, and the
editor tab shows the logo and the title. The pencil in the header renames
the conversation; an empty name goes back to the first message. The name
is saved with the session, so Open Saved Session and
kaitoi code --resume list it by that name.
Replies stream as Markdown. The model's thinking, when it shares it, is
folded under Thinking.
Tool calls show what Kaitoi Code is doing (reading, searching, editing,
running a command) and whether it worked.
Permission questions appear as buttons: Allow, Allow for this
session (where Kaitoi Code offers it) and Deny. When a question is
about a change to a file, the change opens in the diff editor beside the
chat, titled <file> (Kaitoi Code), before you answer. Every finished edit
has a View changes link.
Mode: Plan reads and answers without changing anything, Build reads,
edits and runs with your approval, Crew hands the work to a Crew run (needs
a Kaitoi login).
Stop ends the running turn; open questions are withdrawn.
The file in your editor goes with each message: the selected text when
there is a selection, otherwise its name, which Kaitoi Code reads when your
message is about it (a file you add or @-mention is read with the
message). It shows above the message box with a dashed outline; click its
× to leave it out of one message. Turn it off with
kaitoiCode.includeCurrentFile.
Messages sent while Kaitoi Code works wait under Waiting and go
when the turn finishes. Edit takes one back into the message box, and
Stop puts every waiting message back. With kaitoiCode.followUp set to
interrupt, a new message stops the running turn and goes instead.
What it cost: under each reply, its credits and the conversation's so
far, as the terminal shows them after a turn; hover for the tokens and the
dollar figure. The composer shows the conversation's total. A local model
says "not billed", and Codex "ChatGPT subscription" (Kaitoi's tools still
use credits).
Code blocks in replies are highlighted, with a Copy button. A copy
button under each message copies it; the one under a reply copies all of it.
Time and duration: each message and reply shows when it was sent or
finished. Once a turn is over, its steps (thinking, tool calls, the text
between them) fold under Worked for 3m 36s, leaving the final reply in
view; click the line to unfold them.
What a turn changed: under the reply, a summary lists the files Kaitoi
Code edited, with the lines each gained and lost. View changes opens all
of them in one diff tab (the right side is the file itself, so you can edit
it there), a file opens its own diff, and Undo puts the files back as
they were before the turn (Redo brings the changes back). Files changed
since are named and only touched once you agree, and Kaitoi Code is told
with your next message. Files a command changed are not listed.
Subagents: when Kaitoi Code hands part of the work to a subagent (an
explorer, a planner, a reviewer, an implementer...), it shows as a card
with the agent's role and task, what it is doing as it works, and its
report when it finishes. Its questions come on the usual approval cards,
named with the agent's id and showing the diff of an edit, and its edits
count in the turn's summary. Stop ends it with the turn. Subagents run
while the turn waits for them; background agents are terminal-only for now.
A subagent uses the session's model unless you choose one for its role:
/agents lists the roles and where each runs, and
/agents engine <role> <kaitoi|local|claude|codex> [provider] [model]
sets it (default undoes it), saved in agent.json.
Going back: hover one of your messages for Edit and Restore
checkpoint. Both go back to before that message: the replies after it
leave the chat (the full conversation stays in your saved sessions), the
message returns to the box to edit or send again, and, if you choose,
Kaitoi Code puts the files back as its checkpoint from before the message
has them. /undo does this for your last message.
@ and / in the message box: @ completes the workspace's files and
folders (Kaitoi Code reads what you mention, as in the terminal); / lists
commands. The editor's own are /new, /model, /history, /undo,
/rename and /editor. Kaitoi Code's run as in the terminal: /status,
/cost, /context, /skills, /mcp, /permissions, /doctor and the
others that show something answer in the chat; /mode, /plan, /build,
/effort and /internet change the session; and your project's command
files, skills and MCP prompts are there by name. /help lists them all,
and the sliders button under the message box opens the same list. As you
type a command's arguments, the list shows what can come next, as the
terminal does: /agents offers engine, then the roles, the engines,
and Kaitoi's providers and models.
Your earlier messages: Up in the message box brings back the messages
you sent from this workspace, newest first, and Down goes forward again,
back to what you were writing. With text in the box, Up does it only from
the start of the text.
Images: paste a screenshot into the message box, or drop image files
on it, and they go with your message (PNG, JPEG, WebP or GIF, up to 5 MB,
four to a message). Files dropped from the Explorer (hold Shift) are added
as links.
Reasoning effort: for a model that takes one, the composer offers Auto,
Low, Medium or High (and more for Codex), for the rest of the session.
The context meter in the composer fills as the conversation nears what
Kaitoi Code can send the model; hover it for the figure and when Kaitoi
Code summarizes the conversation to go on.
When a long turn finishes while VS Code or the chat is out of view, a
notification says so (kaitoiCode.notifyWhenDone).
Edits in the editor
Kaitoi Code makes its edits in VS Code's documents and leaves them unsaved: the
file opens beside the chat with the change in it, and you review it there,
then save it, undo it (Cmd+Z / Ctrl+Z) or revert it. After a turn the summary
of its changes offers Save for the files waiting unsaved. Kaitoi Code also reads
files as the editor has them, so it sees changes you have not saved.
Commands read the disk, so before Kaitoi Code runs one it saves the files it
changed. Turn this off with kaitoiCode.editInEditor to have edits written
straight to disk. Codex sessions always write to disk: Codex edits files
itself.
In the editor
- Add to Chat (in the Explorer's, the editor tab's and the editor's
context menus) adds files and folders to your next message. Kaitoi Code
reads a file, or lists a folder, as an
@ mention does in the terminal.
- Implement with Kaitoi Code appears above
TODO and FIXME comments.
It sends the comment, with a link to it and the code after it.
- Fix with Kaitoi Code is a quick fix (the light bulb, or Cmd+. /
Ctrl+.) on errors and warnings. It sends the problem with a link to its
lines.
Both send an ordinary message: in Build mode Kaitoi Code still asks before
each change.
Kaitoi Code asks a folder's trust before it touches files. In VS Code that
answer comes from the workspace trust you already gave, and the chat says so.
Commands
| Command |
What it does |
| Kaitoi Code: New Session |
Starts a new session with an empty chat. |
| Kaitoi Code: Send Selection |
Adds the selected text, with its file and lines, to your next message. Also in the editor's context menu. |
| Kaitoi Code: Add to Chat |
Adds files or folders to your next message. Also in the Explorer's, the editor tab's and the editor's context menus. |
| Kaitoi Code: Open Saved Session... |
Lists this folder's saved sessions (the ones kaitoi code --resume offers) and continues the one you pick in the chat. |
| Kaitoi Code: Rename Conversation... |
Names the current conversation, as the pencil in the chat's header does. |
| Kaitoi Code: Open Chat in Editor |
Shows the chat in an editor tab beside your code, as well as in the side bar. |
| Kaitoi Code: Cancel |
Stops the running turn. |
| Kaitoi Code: Sign In |
Logs in to Kaitoi in your browser. |
Settings
| Setting |
Default |
What it does |
kaitoiCode.executablePath |
kaitoi |
The Kaitoi CLI to run. A name is looked up on your PATH (kaitoi.exe on Windows); a full path is used as it is. User settings only. |
kaitoiCode.provider |
empty |
Provider for new sessions, such as local:ollama. Empty uses your saved default. |
kaitoiCode.model |
empty |
Model for new sessions. Empty uses the provider's default. |
kaitoiCode.mode |
build |
The mode a new session starts in: plan, build or crew. |
kaitoiCode.permissionModal |
false |
Also ask each permission question in a dialog. Closing the dialog denies the request. |
kaitoiCode.editInEditor |
true |
Make edits in the editor's documents, unsaved, and read files as the editor has them. Off, edits go straight to disk. Applies from the next new session. |
kaitoiCode.includeCurrentFile |
true |
Name the file in your editor (or send its selection) with each message. |
kaitoiCode.followUp |
queue |
What a message sent while Kaitoi Code works does: queue waits for the turn, interrupt stops it and goes instead. |
kaitoiCode.todoCodeLens |
true |
Show Implement with Kaitoi Code above TODO and FIXME comments. |
kaitoiCode.quickFix |
true |
Offer Fix with Kaitoi Code as a quick fix on errors and warnings. |
kaitoiCode.notifyWhenDone |
true |
Say when a turn that took a while finishes while VS Code or the chat is out of view. |
Changes to the CLI, provider and model apply from the next new session.
When something goes wrong
- Kaitoi Code needs the Kaitoi CLI: install it, or set
kaitoiCode.executablePath to where it is.
- This Kaitoi CLI does not support editor integration yet: run
kaitoi update.
- Kaitoi Code stopped: the chat says why and starts it again, keeping
the conversation. If it keeps stopping, the chat offers Restart and
Show Log. The log is the Kaitoi Code output channel.
Privacy and security
- The extension runs only in trusted workspaces, starts the CLI without a
shell, and talks to it over standard input and output. It opens no network
port.
- Every change on your machine goes through Kaitoi Code's permission rules
and your answer. Closing a permission dialog denies the request.
- The chat page loads nothing from the internet and shows the model's text
as text, never as HTML. Web links open in your browser only when you click
them; other kinds of links are not opened.
Building from source
Node.js 22 or later.
npm ci
npm test # unit tests, then the integration tests in your installed VS Code
npm run package # kaitoi-code-<version>.vsix
npm test uses the VS Code installed on this machine and does not download
one; set KAITOI_VSCODE_EXECUTABLE to point it at a particular build. Each
run uses a temporary profile, so your own settings are not touched. The
integration tests run on macOS and Linux; the unit tests run anywhere.
Licence
Apache License 2.0. See LICENSE, and THIRD_PARTY_NOTICES.md for the
software the package includes.
| |