An AI coding agent that lives inside Kate
Chat, project tools, sandboxed shell, and permission asks — Grok, OpenAI, OpenRouter, local models, and any ACP agent over stdio.
Kate AI is a KTextEditor plugin that turns Kate into an agentic coding environment. You stay in the editor you already use: the agent reads the workspace, edits open documents in place, runs sandboxed commands, and asks before anything destructive.
It is useful when you want a capable coding agent without leaving Kate — native Qt/KF6, per-user install, your API keys, your models (cloud or local), and a permission bar on every write.
Kate is a serious editor for C++, Qt, KDE, and systems work. Kate AI keeps that workflow intact and adds an agent that already knows the file you are looking at.
| You need | Kate AI does |
|---|---|
| Stay in Kate | Tool view on the right (Ctrl+Alt+A) in the same window. |
| Work on the current project | Reads the workspace, open tabs, cursor, and selection as context. |
| Edit with the buffer, not a fork | read_file / write_file / edit_file go through open Kate documents so unsaved work stays in sync. |
| Inspect before changing | Plan mode is read-only: the model can search and propose a plan, and cannot write or run shell. |
| See what the agent is doing | Streaming replies, collapsible reasoning, a live plan checklist, and tool cards with diffs. |
| Stay in control | Permission bar (Allow / Allow for session / Deny), sandbox profiles, deny globs for secrets. |
| Pick a model | Grok, OpenAI, OpenRouter, OpenAI-compatible (Ollama, vLLM, LocalAI), Claude-compatible, ACP agents (Grok Build, Claude Agent, Gemini CLI, …). |
| Teach the repo | Optional KATEAI.md at the workspace root is loaded as project instructions. |
Typical uses: explain a selection, fix a bug in the current file, refactor with a visible diff, add tests, explore an unfamiliar tree via the project graph, then apply focused patches after you approve them.
- Tool view on the right: View → Tool Views → Kate AI, or Ctrl+Alt+A
- Multi-line prompt: Enter sends, Shift+Enter inserts a newline
- Auto-growing composer, prompt history (Up/Down on an empty first line)
- @ mentions for the active file, selection, workspace, open documents, and relative paths
- Markdown in replies, in your own prompts, and in sub-agent cards — with syntax-highlighted code blocks and a copy button
- Token estimate on the composer
- Stop the current turn at any time
- Scroll-to-bottom control when you leave the live stream
- Toolbar: provider, model (searchable menu), mode, permission mode, sandbox, MCP servers, checkpoints, thinking, reasoning effort, new chat, history, settings
The agent works in one mode at a time, picked from the toolbar or the settings menu. Each mode has its own persona and its own set of tool groups, so a mode cannot quietly do something it was not given.
| Mode | Tool groups | What it is for |
|---|---|---|
| Code | read, edit, command, mcp, web, orchestrate | The default: inspect, edit, and run commands. May delegate a self-contained piece of work to a sub-agent. |
| Ask | read, mcp, web | Answer questions about the code. Cannot change anything. |
| Architect | read, mcp, web | Design a solution and return a plan. Cannot change anything. |
| Debug | read, edit, command, mcp, web, orchestrate | Reproduce, form a hypothesis, then make the smallest fix. May delegate a self-contained piece of work. |
| Orchestrator | read, mcp, web, orchestrate | Split the work up and delegate every edit to a sub-agent. |
orchestrate is the group that carries new_task. Code and Debug get it so the agent can hand off when it judges it worthwhile; Ask and Architect do not, because they promise they cannot change anything and spawning a coder would break that promise. The tool schema itself is only sent to the model when the active mode actually grants it.
Plan mode stays orthogonal to the mode above it: it hard-restricts the model to read-only tools no matter which mode is active.
Drop a Markdown file in <workspace>/.kateai/modes/. The frontmatter sets the identity and the tool groups; the body is appended to the system prompt. .kilocodemodes/ and .roomodes/ are read too, so existing Kilo Code / Roo Code setups work unchanged.
---
id: security-reviewer
name: Security Reviewer
description: Reviews changes for security defects
groups: [read, mcp] # read | edit | command | mcp | orchestrate
roleDefinition: |
You review code. You never edit it and never soften a finding.
customInstructions: |
Cite the CWE for every issue and give a concrete fix.
---
Anything after the frontmatter counts as extra instructions.Unknown tool groups are dropped rather than silently widening access, and a custom mode cannot shadow a built-in one.
Kate AI speaks the Model Context Protocol, so the agent can use any MCP server over stdio (a local process) or Streamable HTTP. Discovered tools appear as mcp__<server>__<tool> and respect the active mode's mcp group.
Servers are read from <workspace>/.kateai/mcp.json in the standard shape, and are edited under Settings → Kate AI → MCP Servers:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/srv/project"],
"alwaysAllow": ["read_file", "list_*"]
},
"docs": {
"type": "http",
"url": "https://example.com/mcp",
"headers": { "Authorization": "Bearer …" },
"alwaysAllow": ["*"]
}
}
}alwaysAllowauto-approves a server's tools;*andprefix*patterns are supported- Servers that annotate a tool with
readOnlyHintare treated as read-only and never prompt - An MCP tool without an auto-approval always prompts, in every permission mode — including Accept edits, because an MCP tool can do anything its server offers
- Servers can be toggled per-entry from the toolbar menu; the status dot turns green when a server is ready
- A server that fails to start is reported and skipped; it never blocks a turn
Every turn snapshots the workspace into a private git repository in the cache directory before the agent changes anything, so any run can be reviewed or rolled back. Your own .git history is never touched.
- Toolbar → checkpoint button: create one manually, or pick any snapshot to diff or restore
- A restore overwrites files that changed after the snapshot and deletes files that were added afterwards;
.gitand the generated project graph are left alone - Retention is configurable (default 20 snapshots) and old snapshots are garbage-collected
- Needs
gitonPATH; without it every checkpoint call becomes a no-op instead of an error
new_task spawns a child agent with its own conversation and returns its answer to the parent turn. This is what makes Orchestrator mode work: it cannot edit files itself and must delegate.
Parallel by default. Independent subtasks requested in the same model response run at the same time — the turn does not wait for one to finish before starting the next. Concurrency is capped (default 3, Checkpoints & Subtasks tab); when the slots are full the model is told so rather than being left to retry.
The orchestrator picks a sub-agent by name, and each name comes with a mode and a description of what it is good at:
| Agent | Mode | Use it for |
|---|---|---|
| scout | ask | Read-only reconnaissance: "where is X defined", "what calls this" |
| architect | architect | Designing a solution and returning a plan |
| coder | code | Implementing a change end to end |
| debugger | debug | Reproducing a failure and making the smallest fix |
| reviewer | ask | Checking another agent's work before accepting it |
Only coder can edit. Define your own under Settings → Agent Team, or share them with the project in <workspace>/.kateai/agents/*.md:
---
id: db-migrator
name: DB Migrator
description: Writes and reviews database migrations
mode: code
---
Anything after the frontmatter is extra guidance for the agent.- One MCP connection. Sub-agents borrow the parent's, instead of dialing every server again.
- One edit-lock table. Two agents editing one file would silently overwrite each other, so the second one is refused with a clear message until the first reports back. Give each agent its own files.
- Separate budgets. A sub-agent gets half the parent's tool-call and model-request budget so a runaway child cannot starve its siblings.
- Auditable.
new_tasktakesinclude_transcript: true, which returns the sub-agent's tool log alongside its answer so the orchestrator can check how it got there. - Live. The running card streams each tool start/finish, progress text and command output into its activity log; the card's "Doing:" line follows the latest step so the work is visible without waiting for the final answer.
- Cancelable. Each sub-agent can be stopped on its own from the chat card, or all at once from the team menu.
Sub-agents get a card of their own rather than a generic tool row: agent name and mode, a live Running · 12s · 3 tools status, a Cancel button, and a headline that names the tool in flight (colour-coded by kind) instead of leaving only a spinner. The answer lands in the body with a Copy button, and an expandable activity log shows the tools and errors behind it; concurrent cards share one bounded tab strip. The toolbar shows how many agents are in flight and opens a menu with the roster and Cancel all.
The model can call tools, read the results, and continue until the task is done (bounded by max model requests, max tool calls, and a requests-per-minute cap).
- Streaming text and hidden reasoning (
reasoning_content/<thinking>) - Structured implementation plan rendered as a checklist that updates as steps complete
- Parallel tool calls when the provider supports them
- Self-critique and required verification after file mutations (read, test, build, or lint)
- Adaptive temperature (higher while exploring, lower while applying edits)
- Automatic retry on rate limits, 5xx, and network errors (exponential backoff)
- Repeat-call detection so the agent does not loop on the same failed tool
- Window-aware context compression that keeps a substantial recent tail and preserves requests, files, graph relationships, and recent failures
You ──► LLM (Grok / OpenAI / OpenRouter / local) or any ACP agent over stdio
│
├── thinking (collapsible) + plan checklist
├── stream the answer into the panel
└── tool calls
├── read / search / graph → auto
├── write / edit / bash → permission bar + diff preview
└── sandbox + deny globs
└── result back to the LLM
| Tool | What it does |
|---|---|
read_file |
Read a UTF-8 file; offset / limit for large files |
read_tool_result |
Page back a tool output that was too large to keep in the conversation |
write_file |
Create or overwrite a file (open Kate buffer if the file is already open). Refuses an overwrite if the file changed since the agent read it. |
edit_file |
Exact-string replace; optional replace_all |
multi_edit_file |
Apply multiple non-contiguous edits to a file in a single tool call |
apply_patch |
Apply a unified diff, possibly covering several files, atomically (all files or none) |
todo_write / todo_read |
Replace / read the task checklist shown to the user (statuses: pending, in_progress, completed) |
think |
Record reasoning into the transcript's thinking block |
exit_plan_mode |
Leave plan mode once the plan is approved, so the turn can start editing |
list_dir |
List a directory |
grep |
Regex search with optional glob, case-insensitivity, and context lines |
glob |
Find paths (**/*.h, src/**/*.cpp, …) |
bash |
Run a command in the workspace under the active sandbox |
query_project_graph |
Query indexed files, symbols, imports, dependents, and paths |
lsp_diagnostics |
Language-server/editor diagnostics (errors, warnings) for one file or workspace-wide |
lsp_symbols |
A file's classes and functions with line numbers |
lsp_hover |
The enclosing symbol at a position plus its declaration |
lsp_definition / lsp_references |
Where a symbol is defined / used across the workspace |
lsp_code_actions |
Quick fixes the language server offers at a position |
debug_status / debug_stack / debug_locals / debug_breakpoints |
Live Kate debugger: session state, backtrace, locals, breakpoints |
debug_select_frame / debug_select_thread |
Change the frame or thread the debugger tools read |
debug_snapshot |
Capture debugger state, or diff two snapshots |
debug_set_breakpoint |
Set, condition, or remove a breakpoint |
debug_step |
Continue, step over/into/out, or run to a line |
debug_eval / debug_console |
Evaluate an expression in the paused frame, or run a debugger console command |
debug_session |
Start, stop, or attach a debug session |
build_targets / build_run |
List and build targets through Kate's Build plugin |
terminal_run |
Run a command in Kate's embedded terminal |
write_plan_file |
Write the implementation plan for a complicated task to a temp file the user can open and follow |
suggest |
Post a suggestion card for the user to accept or dismiss instead of making an unrequested change |
question |
Ask the user something and wait for the answer before continuing |
new_task |
Spawn a sub-agent by name or mode and return its answer |
Plus every tool discovered from the connected MCP servers, as mcp__<server>__<tool>.
In Plan mode, Ask, Architect, and Orchestrator the model only receives the read-only group (read_file, read_tool_result, list_dir, grep, glob, query_project_graph, write_plan_file, suggest, question, todo_write, todo_read, think, exit_plan_mode, lsp_*, the read-only debug_* tools, and build_targets) plus MCP tools. Tool availability is enforced twice — once in the request that advertises the tools, and again when a call arrives — so a model that hallucinates a write gets a clear rejection instead of a silent one. ACP agents run their own tools, so Kate cannot stop one that never asks permission; it shows a notice instead, and the permission card still lets you approve a tool the active mode does not list.
write_plan_file is the one tool that writes a file without touching the project: the destination is a per-workspace temp file Kate picks itself, so it is safe in read-only modes and plan mode, never prompts, and never enters the edit tracker. Agents are told to keep it current as the work moves, which gives the user a running plan they can open next to the code.
suggest is how the agent raises something the user did not ask for. It posts a card into the transcript with the suggestion as markdown, an optional path:line anchor, and Accept / Dismiss buttons. Accept opens the anchored file at that line in the editor; Dismiss removes the card. Suggestions touch nothing, so they are safe in read-only modes and never create a checkpoint. ACP agents reach the same card through the suggest client method or their own suggest/suggestion tool call, whose text/message/file_path/start_line shape is normalized onto the card's fields.
question is how the agent asks instead of guessing. The turn stops, and a card appears in the intent dock above the input with the question, the likely answers as one-tap chips, and a line to type anything else. The answer becomes the tool result and the agent resumes from it — so a decision only the user can make (this approach or that one, a missing requirement, a destructive action) never turns into a guess. allow_freeform: false removes the typing line and leaves only the offered answers. Asking has no effect on the workspace, so it is safe in read-only modes and never prompts for permission. ACP agents that expose their own question tool (including the Claude/OpenCode questions[] shape) get the same card; a permission request whose options are answer labels is shown as a question card too. Because ACP has no client-to-agent tool-result channel for ordinary tool calls, their answer is sent as the next prompt after the current turn; a permission request returns the selected option directly.
Each tool call appears as a compact card in the transcript (icon, name, shell-style summary). Expand it for arguments and output.
write_file/edit_file/multi_edit_fileshow a unified diff in the card before you approve- Other tools show a text preview (command, grep hits, graph summary)
bashoutput streams into its card as the command writes it, dimmed while the call is still running and replaced by the final result when it exits- Each tool family carries its own colour — on the card rail, the icon and the tool name — so a long run can be scanned by colour before a single word is read; a failed card goes red regardless
- Older cards auto-collapse after a configurable count so long runs stay responsive
Accept edits mode lets the agent write without stopping to ask, then hands you the bill afterwards. Pending changes collect in a review queue under the transcript, one row per file:
- Keep accepts a file, Reject reverts it to the content it had before the turn started that file
- A file the agent created is labelled
new, and rejecting it deletes the file rather than leaving a zero-byte one behind - Several edits to the same file collapse into one row showing how many were made, with the counts totalled across all of them
- Review opens the combined diff for that file; Escape closes it without deciding anything
- Undo (or
Ctrl+Zwith the queue focused) reverses the last decision, restoring the file too - Keep All / Reject All settle every pending file; the queue clears when you switch conversations, so a decision about one thread can never revert another thread's files
File-mutating tool calls from ACP agents feed the same queue in every permission mode. An ACP agent is a separate process whose tool calls Kate only gates when the agent chooses to ask, so tracking its edits unconditionally is the only way its changes stay reviewable. Because every agent names its own tools, the ACP side is recognised by protocol kind (edit, write, delete, or a diff block) rather than by tool name.
The composer shows context-window usage as a percentage, turning amber at 70% and red at 90%, so a turn that is about to compact its own history is visible before it happens. Older turns are compacted automatically, so prompting never stops on a full window; and once the readout reaches 100% the whole history is folded into a summary at once, reclaiming the window without waiting for the next request to trigger it. A reset folds the conversation into a summary that keeps the leading system prompt, every request that was made, the files touched, the tools used, and where the work had got to — the transcript itself is untouched, so the thread stays readable.
Kate AI is a first-class KTextEditor plugin, so it sees the same documents you do.
- Active file, cursor line and column, selection with its line range (up to 4k of text), the file's language, unsaved state, bookmarks, and the list of open files are sent as editor context; an untitled buffer sends its content so the model can still see it. The context also carries the git branch, the enclosing symbol at the cursor (from the project graph), the LSP plugin state, and the active file's error/warning count — and it refreshes live as you move the cursor or change the selection
- Reads and writes prefer the in-memory buffer over disk
- LSP integration: Kate AI detects Kate's LSP client plugin (
lspclientplugin) at runtime. Thelsp_*tools (diagnostics, symbols, hover, definition, references, code actions) answer from it when it can and fall back to the project graph and text search otherwise;lsp_diagnosticsreads structured rows from Kate's diagnostics model when it is available, so severity, source, code, and ranges survive, including for workspace files that are not open. Hovering a line with an error/warning mark shows the diagnostic; AI completions step aside while the native (LSP) completion popup is open. When no LSP server runs, the tools say so and the agent falls back to builds/tests viabash - Live debugger: Kate AI bridges Kate's debugger plugin (
kategdbplugin, GDB/DAP). The current session, stop reason, frame, stack, locals, and breakpoints are part of the agent's context while paused; a crash or exception raises a banner with Diagnose Stop, and debugger state can be snapshotted and diffed. Inline variable notes and hover values appear on the paused line - Kate ecosystem: the Build plugin's targets, the embedded Konsole terminal, project-tree actions, and the Backtrace Browser are available to the agent; review diffs (Accept All / Reject All), debug diffs, and the project graph open in native Kate tabs
- Edit banners: an in-editor banner appears on files the agent changed, with Review (opens the panel) and Reject Changes actions (configurable)
- Edit open files in buffer (settings): agent edits to open documents land in the buffer and stay unsaved — Keep in the review queue saves, Reject restores the buffer. While a change is unsaved, commands the agent runs still read the previous state from disk, so this is off by default
- Save-As carries the review queue along: pending edits follow the file to its new path
- Conversations are restored per Kate session and per window, so each window reopens its own chat
- Right-click Kate AI submenu on any editor view:
- Ask Kate AI About This — explain the selection (or current line)
- Fix Selection — find problems, explain, apply
- Refactor Selection — clarity and maintainability, then apply
- Add Tests for Selection — propose coverage first
- Stop Kate AI action (Tools ▸ Kate AI, bindable in Kate's shortcut settings) aborts the running turn without hunting for the panel button
- Command line:
:kateai ask <text>,:kateai explain|fix|refactor|tests|diagnostics|symbols(act on the selection or the range the command line carries, vi-mode'<,'>kateai fixincluded),:kateai debug|stack|break|snapshotfor the live debugger,:kateai fix-errors|build-errors,:kateai launch-configto generate.vscode/launch.json,:kateai backtrace,:kateai terminal,:kateai blame|commit,:kateai diff-tab|graph-tab|annotations,:kateai context|usage|prompt|memory|toolsto inspect the context window, this turn's counters, the exact prompt, loaded memory, and the effective tool catalog,:kateai stop,:kateai new,:kateai mode <id>,:kateai panel - Workspace root is the nearest parent with
.gitor.kateproject, otherwise the active file’s directory - When a different folder is opened in Kate, Kate AI switches to that workspace (agent context, checkpoints, MCP servers, completions) and shows a notice pinned above the input; the notice fades on its own or when the next turn starts
Kate AI reads the debugger session you already have open, so a paused frame is context instead of something to describe.
debug_status,debug_stack,debug_locals, anddebug_breakpointsreport the live session;debug_select_frame/debug_select_threadmove the context the other tools readdebug_stepcontinues, steps over/into/out, and runs to a line;debug_evalevaluates in the paused frame;debug_consoleruns a raw debugger command;debug_sessionstarts, stops, or attaches- A crash, signal, or exception stop raises a banner on the stopped file with Diagnose Stop, and the prompt starts with the stack and locals
debug_snapshotcaptures the state and can diff two snapshots, so "what changed between these stops?" is one callbuild_targetsandbuild_runuse Kate's Build plugin;terminal_runruns in the embedded Konsole terminal;:kateai launch-configgenerates.vscode/launch.jsonfrom the project's targets- Read-only debugger tools and
build_targetsneed no approval and remain available in plan mode.debug_set_breakpointis a write (its path goes through the sandbox), and stepping, evaluating, running a session, building, andterminal_runare executes, so they use the normal permission bar and sandbox checks - Works with GDB/DAP through Kate's
kategdbplugin; when the plugin is not loaded the tools say so and point atbashinstead of failing
- Thinking mode captures model reasoning in a collapsible “Reasoning” block (markdown, full reasoning block expandable in chat)
- Auto-collapse when the visible answer starts; click to expand later
- Plan mode (toolbar): read-only tools only, for inspection and an implementation plan, on top of whichever mode is active
- Structured plans render as an interactive checklist; steps can be marked complete as the agent works
- Reasoning effort (
minimal/low/medium/high) for models that expose it (e.g. Grok reasoning)
Alongside KATEAI.md, the agent picks up rules files the same way Kilo Code does, and folds them into the system prompt in this order:
- Global rules from Settings → Kate AI → Modes & Tools
<workspace>/.kateai/rules/*.md<workspace>/.clinerules/*.mdand.kilocoderules/*.md<workspace>/AGENTS.mdandCLAUDE.md- The mode's own rule file last, so
<workspace>/.kateai/rules/<modeId>.mdwins
Each rule file is wrapped in a <rules source="…"> block. Nothing outside those directories is ever read as instructions — mcp.json and other configuration are excluded.
Nothing destructive runs silently.
| Permission mode | What runs without asking |
|---|---|
| Ask (default) | Read-only tools, read-only shell (ls, git status, …), and new_task |
| Accept edits | File writes too; shell still prompts; pending edits can be accepted or rejected as a batch |
| Always approve | Tools run without a prompt |
Delegation itself never prompts: spawning a sub-agent is consent to spend, not a mutation. Every tool the sub-agent actually runs is still judged by this policy, so allowing the spawn does not let it edit unattended.
On top of the mode, individual tools can be auto-approved so they never prompt — from Settings → Modes & Tools for the built-in tools, and from the settings menu for MCP tools (which is the same thing as a server's alwaysAllow). Auto-approval sits below Always approve and above everything else, but it still never overrides the hard-deny list.
Hard-denied commands (rm -rf /, mkfs, dd to devices, curl-piped-to-shell) are blocked in every mode.
| Sandbox | Reads | Writes | Child network |
|---|---|---|---|
| Workspace | Anywhere except deny globs | Workspace + private /tmp |
Allowed |
| Read-only | Anywhere except deny globs | Private /tmp only |
Blocked |
| Strict | Workspace only | Workspace + private /tmp |
Blocked |
| Off | Deny globs only | Deny globs only | Unsandboxed |
Shell commands run inside an OS-level sandbox, not just a command filter:
- Linux (validated): bubblewrap creates user, PID, IPC, UTS and cgroup namespaces, drops all capabilities, starts a new session, replaces
/tmpwith a private tmpfs, and mounts the host read-only for Workspace / Read-only. Strict starts from a tmpfs root and mounts only the runtime (/usr,/etc, libraries,/opt,/nix) read-only. Read-only and Strict also unshare the network namespace. The workspace is the only writable persistent path in Workspace and Strict. - macOS:
sandbox-execseatbelt profiles deny writes outside the workspace and block the network in Read-only / Strict. The code path is built but was not runtime-validated for this release. - Windows: there is no bundled OS sandbox helper. Workspace runs with a workspace working directory plus the command policy, which is not a hard boundary; Read-only and Strict refuse to run instead of silently weakening their promise. Choose Off to run unsandboxed.
If bubblewrap cannot start or create the required namespaces, sandboxed commands fail with an explanation rather than falling back to an unsandboxed run. The sandbox is not a virtual machine: it shares the host kernel, and sandbox-exec is deprecated by Apple.
Common credential stores (~/.ssh, ~/.gnupg, ~/.aws, cloud CLI configs, keyrings, browser profiles, ~/.local/share/kateai) and session channels (/run/dbus, Docker/Podman sockets, the per-user runtime directory) are masked inside the sandbox even when a command constructs the path dynamically. Sandboxed shell commands also start from a scrubbed environment: secret-shaped variables and DBus, X11, Wayland, SSH-agent, GPG-agent, and PulseAudio/PipeWire channels are removed, and the shell does not source the user's login profile (which could re-export them). Stdio MCP servers and ACP terminal commands use the same policy; add a variable explicitly in the server's env block or the terminal request when a command genuinely needs it.
Always blocked paths: .env, .env.*, *.pem, *.key, id_rsa / id_ecdsa / id_ed25519, .ssh/**, AWS credentials, GnuPG, .netrc, *.p12, *.pfx. Extra deny globs can be added in settings.
0.7 makes the turn replayable and makes "done" mean "the check passed".
- Event log. Every turn, step, request, tool call/result, permission
decision and verification is appended to an event table in the session
database. The transcript is a projection.
:kateai traceexports the redacted log as JSONL. - Verification. After a file mutation Kate AI discovers checks from
.kateai/config.json,## CommandsinAGENTS.md/KATEAI.md/CLAUDE.md, or the build system (CTest, Cargo, npm/pnpm/yarn, pytest, Make). A failing check sends the output back to the model and blocks completion; passing checks become the evidence the final answer must cite.:kateai verifyruns the plan now. - Policy.
.kateai/policy.json, the user policy and the managed policy add deny-first rules for tools, paths, commands, risk and MCP tools. The hardline floor (.env, private keys,rm -rf /, force-pushes to protected refs) applies even in Always approve.:kateai policyshows the rules. - Hooks.
PreToolUse,PostToolUse,Stopand session/prompt hooks can block, rewrite arguments or add context. Project hooks require:kateai trust-hooks;:kateai hooksshows the state. Seedocs/HOOKS.mdanddocs/POLICY.md.
All harness features default on. For a bisect or a minimal setup:
KATEAI_HARNESS_FLAGS=-verificationGate,-hooks,+eventLog kate0.8 keeps long sessions coherent and stops a large MCP catalog from consuming the window before work starts.
- Prompt. The system prompt is deterministic and budgeted: identity, mode,
execution, model guidance, reasoning, verification, style, environment, rules,
memory, graph, and plan sections in a fixed order. Editor state stays in a
transient turn message, so the static prefix remains cacheable.
:kateai promptshows the exact prompt and its section token table. - Context. Oversized tool output is paged to the content store, old output is pruned, old turns are snipped, and the summary merges incrementally so an early decision survives a second compaction. The plan, touched files, and running sub-agents are rehydrated into a transient message. Provider usage calibrates the local token estimate.
- Memory. Kate reads
AGENTS.md,CLAUDE.md,KATEAI.md,.kateai/rules,.claude/rules,.agents/rules, and nested/path-scoped files, with managed/user/project/local precedence.memory_writeproposes a note in.kateai/memory/<topic>.md; the user approves the diff.:kateai memorylists what loaded and what it costs. - Tools. Every built-in tool has declarative metadata and its own result
budget. When the catalog is large,
tool_search,tool_describe, andtool_calldiscover deferred tools by intent; MCP tools defer by default.:kateai toolsshows the effective set and schema cost. - Model profiles. Context window, output limit, pricing, cache style, prompt variant, and edit dialect come from a family registry. Unknown models get a conservative 32k profile.
- Edits. Exact matching stays primary; a failed
edit_fileretries with smart quotes, CRLF, trailing whitespace, and whitespace runs normalised, while ambiguous matches still fail.
The four 0.8 flags default on. To compare against the legacy path:
KATEAI_HARNESS_FLAGS=-promptV2,-contextV2,-memoryV2,-toolSearch kateSee changelogs/CHANGELOG_0.8.0.md and docs/PROMPT.md.
0.9 makes the harness extensible and parallel. A project can ship procedures, agent specifications, policies, and hooks; a sub-agent can work in a temporary git worktree and return a patch without touching the parent tree.
- Skills.
SKILL.mdbundles are discovered in.kateai/skills,.agents/skills,.claude/skills, and the user skills directory. Only the name and a short description enter the prompt; the body is loaded on demand by theskilltool or:kateai skill <name>//<name>. Project skills require:kateai trust-skill <name>after the hash-keyed safety scan.context: forkruns the skill in an isolated sub-agent. Seedocs/SKILLS.md. - Subagents v2. Agent Markdown files can set model, effort, permission
mode, tool allow/deny lists, skills, max turns, memory scope, and
isolation: worktree. Each run gets a JSONL sidechain, a summary-only return, cost/token attribution, and asubagent_transcripttool for audit. Child questions and approvals are forwarded to the parent's intent dock; cancel/timeout cleanup releases worktrees and locks.:kateai apply-subtaskand:kateai discard-subtasksettle an isolated patch. - Inspector.
:kateai inspectoropens a read-only panel with Context, Tools, Rules & Memory, Hooks & Skills, Trace, Cost, and Rewind tabs. It reuses the same reports as the commands and never runs checks or changes a turn.:kateai forkcopies the current conversation into a new thread with a parent link.:kateai rewind [id],/fork,/rewind,/inspector,/skills, and/compactare built-in commands. - Edits. A failed exact match now shows the closest matching block with line numbers, in addition to the existing canonicalisation.
- Configuration. On-disk configuration schema v2; v1 files are read as-is and rewritten on the next save.
The 0.9 flags (skills, agentsV2, inspector) default on. To compare
against the 0.8 behaviour:
KATEAI_HARNESS_FLAGS=-skills,-agentsV2,-inspector kateSee changelogs/CHANGELOG_0.9.0.md and docs/SKILLS.md.
1.0 makes the harness a platform. The editor plugin and the new headless client run the same loop, tools, policy, verification gate, and event log.
- Cost and traces. The cost ledger prices provider-reported input, output,
cache-read, and cache-write tokens per model; unknown prices are reported as
unknown.
:kateai usageand the inspector Cost tab show per-role and sub-agent attribution.:kateai tracenow prints a turn/step/tool/permission waterfall derived from the event log and exports both events and spans. A soft per-conversation budget warns once and never fails a turn. Seedocs/TELEMETRY.md. - OTLP export. Off by default. Enable
telemetryand set an endpoint in Settings → Agent & Context to export OTLP/HTTP JSON spans (for example to a local collector on127.0.0.1:4318). A collector failure is a notice, not a turn failure. - Evaluation harness.
tests/evalsruns the real headless binary against a scripted provider and fixtures, with assertions on files, events, exit codes, verification evidence, tool failures, and cost.cmake --build build --target harness_evalruns the smoke and injection suites; seedocs/EVALS.md. - Headless CLI.
kateai-headless runaccepts a workspace, prompt, provider, permission/sandbox mode, budgets, and an output directory. It writesevents.jsonl,summary.json,trace.jsonl, andpatch.diff, with deterministic exit codes (0success,2failure,4permission required,5question required).kateai-headless replayvalidates a recorded turn without a model. Seedocs/HEADLESS.md. - ACP server.
kateai-headless acp --stdiolets another editor or host create sessions, stream message/thought/tool/plan updates, answer permission requests and questions, and cancel. Each session has its own conversation and event log. Seedocs/ACP_SERVER.md. - Configuration. Schema v4 is additive: telemetry, budget, and no-key defaults keep the 0.9 behaviour when unset.
See changelogs/CHANGELOG_1.0.0.md.
| Provider | Default endpoint | Default model |
|---|---|---|
| Grok (xAI) | https://api.x.ai/v1 |
grok-4.5 |
| OpenAI | https://api.openai.com/v1 |
gpt-4.1 |
| OpenRouter | https://openrouter.ai/api/v1 |
x-ai/grok-4 |
| OpenAI compatible | http://localhost:11434/v1 |
Ollama, LocalAI, vLLM, … |
| Claude compatible | https://api.anthropic.com/v1 |
Anthropic Messages API / Bedrock-style |
| ACP | stdio JSON-RPC (or HTTP) | Any Agent Client Protocol agent |
ACP API formats (Settings → Kate AI → AI Providers → ACP Agent):
| Format | How it talks | Auth |
|---|---|---|
| ACP native (default) | Spawns a stdio subprocess and speaks ACP JSON-RPC | The agent's own CLI login; optional API key copied into a per-agent env var |
| OpenAI compatible | HTTP POST /chat/completions at the endpoint URL |
Bearer |
| Anthropic / Claude compatible | HTTP POST /v1/messages |
x-api-key |
Native ACP works with any stdio agent. Pick a preset (command/args are filled in) or choose Custom and type your own launch line:
| Agent | Default command | Default arguments |
|---|---|---|
| Grok Build | grok |
agent stdio |
| Claude Agent | npx |
-y @agentclientprotocol/claude-agent-acp |
| Codex | npx |
-y @agentclientprotocol/codex-acp |
| Gemini CLI | gemini |
--acp |
| GitHub Copilot | copilot |
--acp |
| goose | goose |
acp |
| OpenCode | opencode |
acp |
| Cline | npx |
-y cline --acp |
| Qwen Code | npx |
-y @qwen-code/qwen-code --acp |
| Auggie CLI | npx |
-y @augmentcode/auggie --acp |
| Cursor | cursor-agent |
acp |
| Custom | (yours) | (yours) |
Kate is the ACP client: session/prompt, session/update, session/request_permission, fs/read_text_file, fs/write_text_file, terminal/*. Always-approve is handled in Kate for every agent. Grok Build also receives --model / --always-approve and Grok _meta (yoloMode).
When an ACP agent is selected, the composer hint mentions / from startup,
even before the live session advertises its command list. Type / as the first
character to open a filtered list above the cursor; each command's description
is shown, and Enter or Tab inserts the selected command. The list is remembered
per agent, so reopening Kate shows the commands the agent advertised last time
without waiting for a turn; before the first session, / explains that the
agent advertises its commands when a session starts.
Model orchestration pairs a planner model with an executor model in one turn. The planner is read-only: it inspects the project, writes a concrete plan and reviews the result. The executor performs the searches, edits, commands, builds and tests. The two models can use different API-key providers.
Enable it under Settings → Kate AI → AI Providers → Model Orchestration, then pick a planner and executor. The model picker also shows an Orchestrator row; selecting an ordinary model turns the pair off.
- The planner can explore with read tools and
submit_plan. It never receives edit, command or sub-agent tools. - The executor gets the plan as a transient directive and the active mode's
normal tools. It can hand control back with
request_replan. - The planner reviews changed files and verification evidence through
submit_review, returning either approval or concrete fixes. - Replans and review rounds are bounded in settings.
- Only API-key providers are supported. ACP agents and Telegram cannot be used for either role.
- Usage and cost are attributed per role in
:kateai usage.
See docs/ORCHESTRATION.md for the full design, triggers and edge cases.
Different ACP agents name their tools differently (fs/read_text_file, terminal/exec, edit, write, apply_patch, str_replace_editor, …). KateAI normalises every ACP tool name to a canonical KateAI name on ingest, so cards, colours, summaries, permissions, edit tracking, and history restoration all behave consistently regardless of the agent:
- Alias map: common ACP names map to canonical names (
read_file,write_file,edit_file,apply_patch,multi_edit_file,bash,list_dir,grep,glob,web_search,web_fetch,write_plan_file,query_project_graph,question— includingask_user/ask_user_question,todo_write/todo_read,exit_plan_mode,think,new_task). MCP-prefixed names (mcp__*) are preserved. Unified-diff text in anapply_patchcall is parsed into per-file diffs, so multi-file patches render one card entry per file. - Tool cards: icons, colours, and labels resolve via the canonical name, so an ACP edit card looks identical to a native edit card.
- Permissions: ACP permission requests are accepted by default. Security & Permissions → ACP tools can turn this off. Kate-hosted ACP client methods also override mode access and ordinary policy rules, so they do not enter the repeated-decline loop; immutable hard denies and handler sandbox checks still apply. Risk classification and auto-approve lists work with canonical and qualified names; in
AcceptEditsmode, ACP edits are still tracked. - Edit tracking: ACP mutations are detected by protocol kind (
edit/write/delete) or a diff block, plus name heuristics; multi-file edits from one call are tracked per file. - History restoration: stored ACP tool calls are normalised on restore, so cards show correct colours, diffs, and language highlighting.
- Mode restrictions: mode-based tool access applies to an external agent's own ACP tools. Kate-hosted client methods follow the default ACP auto-accept policy above.
- Streaming/errors: progress is aggregated (cumulative or delta), errors surface in cards and turn status, cancellation cleans up live tools.
Kate also exposes client methods to ACP agents: fs/read_text_file, fs/write_text_file, terminal/*, query_project_graph, write_plan_file, and suggest. Results are formatted to match native tool output (including the pagination note on reads).
Effort level for ACP agents. Agents that expose a thinking/thought-level selector (Claude Agent, Gemini CLI, …) advertise it as a session config option. The composer's effort button shows the levels the live session advertised; picking one forces it onto the session (session/set_config_option) and pins it — an agent that changes its own level is switched back. Auto releases control and keeps the agent's default. The forced level is also settable in Settings → Kate AI → AI Providers → ACP Agent → Effort Level (editable, so agent-specific ids like think_hard can be typed).
Kate also answers its own client methods, advertised in the initialize capabilities under the _kateai/ names the protocol reserves for extensions: _kateai/query_project_graph (the same graph the native agent queries), _kateai/write_plan_file (files the implementation plan in a per-workspace temp file and returns its path, so the agent can point the user at a plan they can follow), _kateai/suggest (posts a suggestion card with an optional file anchor, resolved against the workspace, so an agent can raise an idea without changing anything), _kateai/ask_user (asks the user a question and blocks until they answer — the answer is the RPC result, so ACP agents get the same park-the-turn question flow the native question tool has; the v2-draft elicitation/create method reaches the same UI when the agent offers it), _kateai/todo_write / _kateai/todo_read (the same checklist the native todo tools drive), and _kateai/lsp_diagnostics / _kateai/lsp_symbols / _kateai/lsp_hover / _kateai/lsp_definition / _kateai/lsp_references / _kateai/lsp_code_actions (the read-only language-server surface, formatted like the native lsp_* tools; when no LSP server runs they say so instead of failing). The bare names still work. Your global rules and extra system prompt, and these method names, are sent to the agent once at the start of each session, since agents do not receive Kate's own system prompt.
To use Grok Build: install the Grok CLI, run grok once to log in, then set the provider to ACP with format ACP native and agent Grok Build. Other agents: install their CLI (or have npx on PATH), complete that agent's login, and pick the matching preset.
The ACP registry. Settings → Kate AI → ACP Registry lists every agent in the official ACP registry. Package agents (npx/uvx) are launched directly (npx --yes <package>@<version>, pinned to the registry version) with no global install, the way Zed does it; binary agents are downloaded, checksum-verified, and unpacked into Kate's data dir. Registry env requirements are merged into the agent's environment, per-agent CLI quirks (an acp subcommand, sanitizer flags, --model support) come from a registry-id-keyed table, and the registry list marks entries with an available update. Kate negotiates the protocol version at initialize instead of failing on a mismatch, and supports the v2-draft elicitation channel for asking the user when the agent advertises it.
The model menu fetches live catalogs when the provider supports it; you can still type a model id. Only the selected provider’s key is sent. Keys live in Kate’s config (KateAI group).
- The active conversation is restored when Kate restarts
- Conversation list in the panel: switch, delete, start new (
Ctrl+Alt+N) - Configurable cap on saved conversations (default 50)
- Long transcripts are virtualized: every retained turn stays scrollable while only nearby cards are rendered
- Extra system prompt and
KATEAI.md(optional compression) are included as project context
On workspace load the plugin indexes files, symbols, imports, and relationships, writes the first index to .kateai/project_graph.sqlite, and regenerates it when file or directory timestamps show the cache is stale. A legacy project_graph.json is migrated once and left untouched. The native system prompt and ACP session notes receive a compact graph summary with workspace-relative paths, languages, line counts, symbols, and dependency edges, so agents can orient themselves before searching. The agent can then query it with query_project_graph (summary, nodes, edges, dependencies, dependents, find_related, find_path, dependency_chain), using a path, name, or node id. Node/edge caps and graph-prompt verbosity are configurable.
Settings → Configure Kate → Kate AI, or the gear in the panel. Tabs:
- AI Providers — keys, default models, custom endpoints, ACP format
- Security & Permissions — permission mode, ACP auto-accept, sandbox, command timeout, extra deny globs, tool-card collapse
- Agent & Context — plan mode, thinking, budgets,
KATEAI.md, extra instructions, compression, temperature / top-p / max tokens, reasoning effort, self-critique, parallel tools, verbosity, structured thinking/planning, verification, adaptive temperature, context window reserve, saved-conversation cap - Modes & Tools — default mode, per-tool auto-approval, project rules toggle, global rules
- MCP Servers — server list editor, enable/auto-connect, tool timeout
- Checkpoints & Subtasks — checkpoint toggle and retention, subtask depth, parallel sub-agents, subtask timeout
- Agent Team — the built-in roster and a custom agent editor
Everything a team shares lives next to the code:
<workspace>/.kateai/
├── mcp.json # MCP server definitions
├── modes/ # custom mode definitions (*.md)
├── agents/ # custom sub-agent definitions (*.md)
├── rules/ # project rules (*.md)
└── project_graph.sqlite # generated SQLite cache, excluded from checkpoints
Kate does not need a world-readable system plugin. The default install is per-user: the plugin lives in your home directory, owned by you, mode 700 on Unix. Other accounts on the machine cannot read it. No sudo.
git clone https://github.com/KateAI/kate-ai.git
cd kate-ai
./install.sh --deps # distro / Homebrew packages
./install.sh # same as ./install.sh --userOn Windows:
powershell -ExecutionPolicy Bypass -File .\install.ps1That installs (Linux):
| Path | Mode | Why |
|---|---|---|
~/.local/lib/qt6/plugins/kf6/ktexteditor/kateai.so |
700 |
Only your user can load the plugin |
~/.config/plasma-workspace/env/kate-ai.sh |
600 |
KDE session prepends QT_PLUGIN_PATH |
~/.config/environment.d/50-kate-ai.conf |
600 |
systemd user session does the same |
Kate’s distro build only scans /usr/lib/qt6/plugins. The two env files teach your Kate to also look in ~/.local. They do not replace the system plugin path.
Use it immediately in this terminal:
export QT_PLUGIN_PATH="$HOME/.local/lib/qt6/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}"
kateThen Settings → Configure Kate → Plugins → Kate AI. From the application menu, log out and back in once so the session picks up QT_PLUGIN_PATH.
Uninstall:
./uninstall.shOn Windows: .\install.ps1 -Uninstall.
This is the only case that needs world-readable 755 on Unix: the file is owned by root, and Kate runs as a normal user, so “other” must be able to mmap it.
./install.sh --system./install.sh --package builds a native package from this tree. Recipes live under packaging/.
| Family | How |
|---|---|
| Arch / CachyOS / Manjaro | ./install.sh --deps && ./install.sh --package (or cd packaging/arch && makepkg -si after placing kateai-<ver>.tar.gz from packaging/mk-source-tarball.sh) |
| Fedora / Asahi Remix | ./install.sh --deps && ./install.sh --package → RPM under packaging/dist/ |
| Debian / Ubuntu 25.04+ | ./install.sh --deps && ./install.sh --package → .deb under packaging/dist/ |
Then install the artifact with pacman -U, dnf install, or apt install ./kateai_*.deb.
Install Kate from Homebrew (brew install --cask kate) and the KF6/Qt build stack, then:
./install.sh --deps
./install.shThe script copies kateai.so into ~/Library/Application Support/kate/lib/qt6/plugins/kf6/ktexteditor/ and, when the app bundle is writable, next to Kate.app’s other ktexteditor plugins. A LaunchAgent prepends QT_PLUGIN_PATH for GUI Kate.
A Homebrew-built plugin may not load in the Craft-built Kate.app. For a matching ABI, build with KDE Craft using packaging/craft/kateai.py.
Release macOS assets: kate-bundle-*-macos-*.zip is a Craft-built Kate.app with the plugin already installed, kate-*-macos-*.dmg is the Craft Kate installer, and kateai-*-macos-*.zip contains the plugin alone.
Kate for Windows is a Craft/MSVC build. The plugin has to use the same toolchain.
- Install KDE Craft and Kate.
- Copy
packaging/craft/kateai.pyinto your Craft blueprints tree (for exampleextragear/kateai/kateai.py). - In the Craft shell:
craft kateai - Or from a Craft shell in this repo:
powershell -ExecutionPolicy Bypass -File .\install.ps1
install.ps1 copies kateai.dll into Kate’s kf6\ktexteditor directory when it can write there, otherwise into %LOCALAPPDATA%\KateAI\plugins and sets the user QT_PLUGIN_PATH. The Microsoft Store Kate is not supported.
Prefer ./install.sh. CMake’s relative PATH cache can otherwise install into the source tree. The script copies the built plugin itself:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j"$(nproc)"
mkdir -p ~/.local/lib/qt6/plugins/kf6/ktexteditor
install -m 700 build/bin/kf6/ktexteditor/kateai.so ~/.local/lib/qt6/plugins/kf6/ktexteditor/kateai.so| Platform | Packages |
|---|---|
| Arch / CachyOS / Manjaro | kate extra-cmake-modules cmake ninja qt6-base ktexteditor kcoreaddons ki18n kxmlgui kconfigwidgets kconfig kwidgetsaddons bubblewrap |
| Fedora / Asahi | kate extra-cmake-modules cmake gcc-c++ ninja-build qt6-qtbase-devel kf6-ktexteditor-devel kf6-kcoreaddons-devel kf6-ki18n-devel kf6-kxmlgui-devel kf6-kconfigwidgets-devel bubblewrap |
| Debian / Ubuntu (25.04+) | kate cmake extra-cmake-modules ninja-build qt6-base-dev libkf6texteditor-dev libkf6coreaddons-dev libkf6i18n-dev libkf6xmlgui-dev libkf6configwidgets-dev libkf6config-dev libkf6widgetsaddons-dev bubblewrap |
| macOS | Homebrew: cmake extra-cmake-modules ninja qtbase kcoreaddons ki18n kconfig kconfigwidgets kxmlgui kwidgetsaddons and cask kate; Craft recommended to match Kate.app |
| Windows | KDE Craft + Kate (MSVC). See packaging/windows/install.ps1 |
Needs Kate ≥ 24.08 (KF6), Qt ≥ 6.5, CMake ≥ 3.25. Sandboxed shell uses bwrap on Linux and sandbox-exec on macOS.
| Action | How |
|---|---|
| Open the panel | Ctrl+Alt+A, or View → Tool Views → Kate AI, or Tools → Kate AI → Show Kate AI |
| Send a prompt | Enter |
| New line in the prompt | Shift+Enter |
| Mention a file | Type @ then pick from open documents / active / selection / workspace |
| Previous prompt | Up on an empty first line |
| New chat | Ctrl+Alt+N or the New chat button |
| Past conversations | History button in the panel |
| Stop a turn | Stop |
| Approve a tool | Permission bar: Allow / Allow for session / Deny |
| Ask about the selection | Right-click → Kate AI → Ask Kate AI About This |
| Fix / refactor / tests | Right-click → Kate AI submenu |
Paste an API key under Settings → Configure Kate → Kate AI, pick a provider and model in the panel toolbar, and ask about the current file.
Choose Plan in the chat toolbar when you want an implementation plan before any edits. In this mode Kate AI only receives read-only tools; it cannot run shell commands or change files. Switch back to Agent when you want it to apply the plan.
For repository-specific guidance, create a KATEAI.md at the workspace root. It can describe architecture, style, test commands, and contribution rules. Loading it is enabled by default and can be disabled from Configure Kate AI.
Settings → Configure Kate → Kate AI
API keys:
- Grok / xAI
- OpenAI
- OpenRouter
- OpenAI-compatible — local server URL (Ollama default
http://localhost:11434/v1). For Gemini with explicit cache resources, usehttps://generativelanguage.googleapis.com/v1beta/openai; Kate detects the Google host, switches to the native Gemini transport, and managescachedContentsfor the stable prompt prefix. - Claude-compatible — Anthropic or compatible gateway
- ACP — your ACP server endpoint and API key
Keys are stored through KDE Wallet when it is available. Without a wallet they go to an owner-only credentials.json (never the main Kate config); settings report which backend is active. Keys from earlier releases are migrated automatically. Only the selected provider receives its key.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j"$(nproc)"
ctest --test-dir build --output-on-failure
# Scripted harness scenarios against the real CLI:
cmake --build build --target harness_evalAdd -DKATEAI_ENABLE_EVALS=ON to a CI configure to run the smoke suite from
CTest. See docs/EVALS.md.
Always configure out-of-source (-B build, not cmake .). Do not copy a build/ directory between machines or users — it embeds absolute paths such as /home/<someone>/…. ./install.sh and ./build.sh throw away a cache that belongs to another source path, or they switch to build-$USER if build/ is not writable.
| Path | Role |
|---|---|
src/plugin*.cpp |
Kate / KTextEditor glue, tool view, actions |
src/chatwidget.cpp |
Prompt window, transcript, thinking, plan checklist |
src/toolcallwidget.cpp |
Inline tool cards, live output, diff preview |
src/promptedit.cpp |
Composer, @ completion, prompt history |
src/questionwidget.cpp |
Question card: offered answers plus a line to type one |
src/edittracker.cpp |
Accept / reject pending writes |
src/agentloop.cpp |
LLM ↔ tool loop, verification, budgets |
src/llmclient.cpp |
Streaming (/v1/chat/completions, Anthropic, HTTP ACP), retries |
src/acpclient.cpp |
Native ACP client (stdio JSON-RPC, any ACP agent) |
src/tools.cpp |
File, grep, glob, bash, project-graph tools |
src/graph/ |
Project graph index and queries |
src/sandbox.cpp |
Path jail, deny globs, bubblewrap |
src/permissions.cpp |
Ask / accept-edits / always-approve |
src/sessionstore.cpp |
Conversation persistence |
src/documentbridge.cpp |
Open Kate buffers vs disk |
src/harness/ |
Event log, turn middleware, policy, hooks, checks, prompt/context, tools, skills, cost, telemetry, ACP server |
src/headless/ |
kateai-headless CLI: run, replay, ACP |
tests/evals/ |
Scripted provider, fixtures, scenario runner and reports |
tests/ |
Sandbox, permission, SSE parser, retry, session, prompt tests |
| Problem | Fix |
|---|---|
| Plugin missing after user install | Start Kate from a shell with export QT_PLUGIN_PATH="$HOME/.local/lib/qt6/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}". For the app menu, log out/in once. Check ls -l ~/.local/lib/qt6/plugins/kf6/ktexteditor/kateai.so is -rwx------. On macOS, confirm the LaunchAgent and/or a copy inside Kate.app. On Windows, confirm kateai.dll next to Kate or %LOCALAPPDATA%\KateAI\plugins. |
| Plugin missing after system install | Fully quit Kate. Confirm ls -l $(qtpaths --plugin-dir)/kf6/ktexteditor/kateai.so is -rwxr-xr-x. If it is --x, run sudo chmod 755 on that file. |
Kate aborts at startup with SIGABRT and a QGuiApplicationPrivate::createEventDispatcher backtrace |
Not a plugin problem — the abort happens inside the QApplication constructor in main(), before Kate loads any plugin. Qt could not initialize a QPA platform plugin, i.e. Kate cannot reach the display. Check journalctl --user | grep -i "platform plugin"; Failed to create wl_display (Permission denied) plus could not connect to display :N means the running uid cannot access the session (e.g. a different user than the one who owns the graphical session, or XAUTHORITY is unset/unreadable). Grant X11 access (xhost +SI:localuser:<user> from inside the session) and force QT_QPA_PLATFORM=xcb, or launch Kate as the session owner. |
cmake complains about a foreign /home/… path or CMakeCache.txt |
Leftover build/ from another user or machine. rm -rf build and run ./install.sh again. |
cmake Operation not permitted on prefix.sh |
Stale files in build/ from another user. rm -rf build and configure again. |
Sandboxed bash fails |
On Linux install bubblewrap (bwrap). On macOS sandbox-exec is part of the OS. File tools still work without OS isolation. |
| A request never finishes and the transcript just sits there | A connection that is accepted but then goes silent is now cut off after 3 minutes of no data and reported as a network error, then retried with backoff. A stream that keeps sending tokens is never interrupted. If retries keep failing, check for a proxy, VPN, or captive portal intercepting the provider endpoint. |
| "A model request is already in progress" after a failed retry | Retry state was stranded by a backoff delay that overflowed into a negative timer interval. Fixed in LlmClient::calculateDelay; restart Kate if you are on an older build. |
| No API key error | Open Settings → Configure Kate → Kate AI and paste a key for the selected provider. |
LGPL-2.1-or-later — same family as Kate / KTextEditor plugins.
