---
title: "Kilo"
description: "OpenCode fork with its own XDG folder, one SQLite database for sessions, layered JSON or JSONC config and OpenCode's MCP dialect."
canonical_url: "https://harnesses.agntn.dev/harnesses/kilo"
---
# Kilo

> OpenCode fork with its own XDG folder, one SQLite database for sessions, layered JSON or JSONC config and OpenCode's MCP dialect.

<harness-facts id="kilo">



</harness-facts>

Kilo Code CLI is an OpenCode fork, and it doesn't hide it. The source marks every change with `kilocode_change`, which makes reading it oddly pleasant. Sessions go into one SQLite database, `~/.local/share/kilo/kilo.db`, on an older OpenCode schema.

Config is `kilo.jsonc` or `kilo.json` under `~/.config/kilo/` on every platform, Windows included. Projects keep it in the root or under `.kilo/`, which wins. Kilo still merges `config.json` and leftover `opencode.json` files from the same places. `~/.config/opencode/` is no longer read.

Global rules live in `~/.config/kilo/AGENTS.md`, and that's the file `agents sync` links. Until Kilo's Claude Code migration runs, a missing one falls back to `~/.claude/CLAUDE.md`. Skills come from `~/.config/kilo/skills/` plus `~/.kilo/skills/`, `~/.agents/skills/` and `~/.claude/skills/`. Skills sync owns the first one. After a full sync Kilo finds every skill more than once. Redundant? Sure. Harmless too.

Commands, which Kilo calls workflows, are Markdown in `.kilo/commands/` and `~/.config/kilo/commands/`. Prompt sync writes there. `/goal` is reserved, so a command with that name loses.

MCP servers sit under `mcp` in OpenCode's dialect. The registry maps both `kilo.jsonc` and `kilo.json`. Kilo merges both, with JSONC on top. It writes to the first file that exists, checking JSONC first. Sync and `mcp-servers add` pick the same file. Sync also empties the other one of servers, `keep` aside, because Kilo would still load them.

A JSONC edit touches only the server entry. Comments and trailing commas stay put, so the file still reads like yours.

`kilo run` is the headless mode, `--format json` the structured one. `--variant` carries reasoning effort and `--pure` skips external plugins, so `extensions: false` works. No advisor and no sandbox: its permissions are a ruleset, not a lock.

Kilo exports `KILO_PID` to everything it starts, which is how detection spots it. The `OPENCODE=1` beside it is family resemblance, and the registry doesn't read it.

<harness-sheet id="kilo">



</harness-sheet>


## Sitemap

See the full [sitemap](https://harnesses.agntn.dev/sitemap.md) for all pages.
