PerplexiCode Kilo
Overview · Install · Full Auto · 4.2 · Auto Skill · 4.1 · What's new in 4.0 · 3.5–3.8 · Interface & agents · MCP catalog · MCP & compute · CLI · Models · Commands · Settings · Migrating to 4.0 · Build · Help Core reference · Security policy & threat model · Security & Parrot OS guide
Overview · Capabilities, modes and the shared agent loopFeaturesA Kilo Code-style autonomous coding agent for Antigravity IDE and VS Code, powered by your Perplexity Pro / Max subscription. Plan, write, run and debug code with GPT-6.2 Sol, Claude Opus 5.5, Gemini 4 Carbon, Grok 4.7 and 120+ more Perplexity models. No API keys. Run the same agent core in the editor, in the terminal as
Modes
Agent tools: How it works
Install & sign in · Editor setup, migration and account storageExtension ID: From the Extensions viewVS Code: Visual Studio Marketplace — search for PerplexiCode Kilo in the Extensions view or run Antigravity IDE, Cursor, Windsurf and VSCodium use Open VSX. Open the Extensions view (
One-line install from GitHub ReleasesmacOS / Linux — installs the latest release into Antigravity IDE:
Windows (PowerShell):
Other editors: add
The scripts download Manual install with the Antigravity CLIDownload
The CLI may print Install from the editor UIExtensions view ( After installing
Moving from PerplexiCode 1.x / 2.0Since 2.1.0 the extension has its own ID,
User settings Sign inRun PerplexiCode: Add Perplexity Account and pick one method:
Sessions are kept in the editor's SecretStorage. You can add several accounts; requests are spread across them with round-robin, least-used or failover-only rotation. What's new · 4.2 · Full Auto: give it the task, it gathers skills, decides and finishes
Why it exists. Auto-approve with every box ticked, All commands (*) included, still stopped on some commands. A script like Full Auto is one switch for the other case: you give the task and leave.
Still refused. These exist to get a human yes. With nobody to ask, Full Auto answers no, shows the refusal in the chat and tells the model the result is final (
Skills. The agent looks at the installed skills first. If none fits it calls Turn it on
Full Auto does not commit, push or merge on its own initiative, but it will run whatever commands the task needs. Use it on a clean branch or with worktree isolation ( What's new · 4.1 · Auto Skill: find and install skills from ClawHub, skills.sh and GitHub
Skills are the same
What happens on install
Agent: IDE — Library → Skills → Online: type a topic in the filter and press Search online, or From source… for a spec. PerplexiCode: Install Skill from Source… does the same from the Command Palette. Skills installed from a source show a ClawHub / skills.sh / GitHub badge. CLI
GitHub allows 60 unauthenticated API requests per hour. Set
What's new · 4.0 · Remote core, LSP tool, REPL rewind, verified model catalog and Quick EditRemote core —
|
| Unix socket (default) | ~/.perplexicode/serve.sock, created with 0600 permissions. |
| WebSocket | --port <n> (or --ws for a random port) on 127.0.0.1; --host to change the interface. Every connection needs the bearer token, compared in constant time. |
| Token | PCODE_SERVE_TOKEN, --token-env <VAR>, --token-stdin, or a generated ~/.perplexicode/serve.token (0600). --token <value> on the command line is refused with exit code 64. |
| IDE | PerplexiCode: Remote Core: Connect to pcode serve… asks for the endpoint (perplexicodeKilo.remote.url) and the token, which is kept in SecretStorage. Remote Core: Disconnect returns to local mode. |
| Trust | Project hooks, MCP and LSP servers on the daemon start only for trusted folders (--trust-project). |
pcode serve # Unix socket, token written to ~/.perplexicode/serve.token
pcode serve --port 4190 --token-env PCODE_SERVE_TOKEN # WebSocket on 127.0.0.1:4190
ssh -L 4190:127.0.0.1:4190 build-box # reach a remote daemon through SSH
On start the daemon prints one serve_ready JSON line with the endpoint and the token source (never the token itself). To reach a daemon on another host, forward the socket or port over SSH instead of binding it to a public interface.
lsp tool
The agent can ask the language server instead of grepping: definition, references, hover and diagnostics.
- IDE — uses VS Code's own providers for every language you have installed, no setup.
- CLI / daemon — reads stdio servers from
.lsp.json(Claude Code format). Lookup order:~/.perplexicode/lsp.json→~/.claude/.lsp.json→.perplexicode/lsp.json→.lsp.json; project files need a trusted folder. Agent edits to.lsp.jsonalways ask for confirmation.
// .lsp.json
{
"servers": {
"typescript": { "command": "typescript-language-server", "args": ["--stdio"], "extensions": [".ts", ".tsx"] },
"python": { "command": "pyright-langserver", "args": ["--stdio"], "extensions": [".py"] }
}
}
REPL
| Input | What happens |
|---|---|
!npm test |
Runs the command locally and adds the command, exit code and output to the conversation, so the next prompt can refer to it. |
/rewind · /rewind list · /rewind 3 |
Rolls back the workspace files (restores edited files, deletes files created after the checkpoint) and the session transcript to the latest or the chosen checkpoint. |
| long commands | After one second a live ⏱ timer shows elapsed time (PCODE_COMMAND_TIMER_MS changes the threshold). |
Quick Edit — Cmd/Ctrl+I
Select code, press Cmd+I (macOS) or Ctrl+I (Windows / Linux) and describe the change. The new code streams into a side-by-side diff with +added / -removed counters; nothing is written until you click Apply. Cancel the progress notification to stop the request. Add Selection to Chat is now on Cmd/Ctrl+Shift+I.
Model catalog without a release
pcode models update and PerplexiCode: Update Model Catalog from Repository download bundledModelsConfig.json and its .sha256 from this repository, check the digest and only then switch to the new list. On a mismatch, broken JSON or a network error the built-in snapshot is used. Point perplexicodeKilo.models.remoteCatalogUrl / remoteCatalogSha256Url (CLI --catalog-url / --sha256-url) at your own fork if you maintain one.
Nightly canary
.github/workflows/canary.yml sends one minimal request every night (03:17 UTC) with a test account and opens or updates a “Nightly Perplexity SSE Canary Alert” issue if Perplexity's response format changes. Add the cookie of a test account as the repository secret PPLX_CANARY_COOKIE; without it the job is skipped, not failed. Issue text is redacted.
Upgrading from 3.x? Read Migrating to 4.0 — eleven behaviour changes, no renamed settings.
MCP OAuth & review · 3.8 · OAuth 2.0 + PKCE, /server:skill, argument rules and cross-model review
| OAuth 2.0 + PKCE | pcode mcp login <server> / pcode mcp logout <server>, or OAuth Login / OAuth Logout on an HTTP/SSE server card in Library → MCP. Discovers the authorization server (RFC 8414 / RFC 9728), registers a client when the server supports it (RFC 7591), and receives the code on a 127.0.0.1 loopback. Tokens live in VS Code SecretStorage or the OS keychain (macOS Keychain, secret-tool, Windows Credential Manager; a 0600 file on headless systems) and are refreshed on HTTP 401. |
/server:skill |
Prompts published by connected MCP servers appear in the composer / menu and in the REPL as /<server>:<prompt> [key="value" …]. |
| Argument rules | mcp__db__query(sql:SELECT *), mcp__db__query(sql:*DROP*), mcp__k8s__apply({"metadata":{"namespace":"prod*"}}), mcp__vault__read_resource(uri:secret://*). deny wins over autoApprove.mcp and bypassPermissions, and malformed arguments fail closed. |
| Cross-model review | Off by default. With perplexicodeKilo.agent.crossModelReview (CLI --cross-review) a model from a different family (Anthropic ↔ OpenAI ↔ Google ↔ xAI) reviews the git diff and the verify result before attempt_completion is accepted. Pick the reviewer with crossModelReviewModel / --cross-review-model. |
// .claude/settings.json
{
"permissions": {
"allow": ["mcp__db__query(sql:SELECT *)"],
"deny": ["mcp__db__query(sql:*DROP*)", "mcp__k8s__apply({\"metadata\":{\"namespace\":\"prod*\"}})"]
}
}
![]() OAuth status and Login / Logout in Library → MCP |
![]() An MCP prompt in the / menu |
OAuth was tested against a local OAuth / PKCE test server, not against a specific vendor.
Worktrees · 3.7 · Isolated tasks, Apply / Discard, parallel subagents and CI exit codes
| Isolated task | pcode -w [name] / --worktree, REPL /worktree, or the Worktree pill in the composer (perplexicodeKilo.agent.worktreeEnabled). The task runs in a detached worktree from HEAD. Tools cannot leave it: .., symlinks, git -C, --git-dir, GIT_DIR, cd outside and git push are blocked. Uncommitted changes in your checkout trigger a warning first. |
| Result card | Changed files, the diff and the verify status, with Apply and Discard. Apply checks the patch first and writes to your working copy — no merge, commit or push. On a conflict nothing changes and the conflicting files are listed. CLI: pcode worktree list \| apply <name> \| discard <name>. |
| Parallel subagents | Consecutive new_task calls in Orchestrator mode run at the same time, up to maxParallelSubtasks (default 3, CLI --max-parallel-subtasks). Read-only subagents share the main tree; each writing subagent gets its own worktree. |
| Hooks | WorktreeCreate and WorktreeRemove receive JSON on stdin, can block with exit code 2 or return a custom worktreePath. |
| Exit codes | pcode -p returns a fixed code per outcome — see the table in Headless core & pcode CLI. |
![]() Result card: diff, verify, Apply / Discard |
![]() Apply stops on a conflict and lists the files |
Context · 3.6 · @repo map, post-edit diagnostics, Context Inspector and auto-compaction
@repo |
A structural map of the project — symbols and signatures (TypeScript, JavaScript, Python, Go, Rust), imports, who imports a file and its tests — with the active file and the current git diff first, inside a hard budget (repoMapMaxChars, default 6000). No vector database. On the 24-task benchmark in src/core/repoMapBench.ts it cut read_file calls before the first edit from 4.29 to 1.00 and prompt size by 63% with the same verify pass rate. |
| Diagnostics after edits | After apply_diff, write_to_file, search_and_replace and insert_content the tool result lists only the errors and warnings the edit introduced. |
| Context Inspector | Eye button in the task header, /context, or PerplexiCode: Inspect Task Context… (REPL /context [exclude\|include <id>]): what is in the prompt, why, how many characters, what was compacted — and exclude any item from the next requests. |
| Auto-compaction | At autoCompactThreshold × maxPromptChars (default 80%) older turns become a structured summary — changed files, checked hypotheses, constraints, todo status — while the system prompt and the last autoCompactKeepSteps steps stay verbatim. |
| Rate limits | Jittered exponential backoff and a per-account cap of 12 requests per minute (perplexicodeKilo.rotation.maxRequestsPerMinute, CLI --max-rpm). |

Context Inspector
Reliability & security · 3.5 · Safe resume, task state, SSRF and shell hardening, diagnostics
| Stream safety | A repeated final chunk, a stream cut inside a tool call or a reconnect after an applied edit never apply an edit or run a command twice (covered by SSE replay tests). |
| Safe resume | A command interrupted before its exit code was recorded is marked result not confirmed (command_unconfirmed). After pcode -c / -r or reopening the task, the agent must inspect the workspace before it may run that command again. |
| Task state | A status card in the IDE and a status line in the CLI: waiting for approval, retrying, checking the result, or needs you — with the reason and the rule that caused it. |
| Route line | Each request shows requested mode/model → actual one and the reason (or not reported when Perplexity does not say). stopOnFallback (CLI --stop-on-fallback) stops instead of silently switching. |
web_fetch SSRF guard |
Loopback, RFC 1918, link-local, cloud metadata (169.254.169.254), CGNAT, ULA, .localhost / .internal are blocked, re-checked on every redirect. |
| Shell parser | Chains (;, &&, \|\|, \|, &), env wrappers and bash -c scripts are split and every segment is checked against allow / deny. Substitutions, eval and redirections always ask. |
| Protected configs | Edits to .perplexicode/settings*.json, hooks, .mcp.json, .lsp.json and .claude/** always need your confirmation, even with auto-approve or bypassPermissions. See SECURITY.md. |
| Diagnostics bundle | pcode doctor --bundle or PerplexiCode: Copy Diagnostics Bundle… — versions, stage timings and rule decisions, shown in full before export, with no cookies, headers, prompts, code or terminal output. |
![]() Task state with the rule that stopped it |
![]() Diagnostics preview before copying |
Interface, agents & skills · Presets, reusable workflows and screenshot gallery
Agents, Skills & Presets
Set up subagents and skills from the UI and start common jobs in one click.
| Where | What you get |
|---|---|
| Welcome screen | A Quick start grid with presets (Review my changes, Fix a bug, Write tests, Build a feature, Explain this project, Security audit). The strip below it shows how many subagents and skills are installed and has Install starter pack. |
| Library button in the view title (or PerplexiCode: Agents, Skills & Presets) | Three tabs. Task presets: built-in and your own. Subagents: installed ones (open, delete, Start task) and a catalog of 8 (code-reviewer, test-writer, debugger, security-auditor, docs-writer, refactorer, explorer, planner) that you install into the project or globally. Skills: 8 catalog skills (commit-message, code-review-checklist, write-tests, security-audit, debug-playbook, api-design, release-checklist, readme-writer). Each tab has a form for creating your own items. |
| Mode menu | A Subagents section: pick @debugger and the whole task runs as that subagent, with its prompt and tool list. |
| Composer | /presets, /agents, /skills and /<preset-id> in the slash menu. The selected preset or agent appears as a chip. |
| Command palette | PerplexiCode: Run Task Preset…. |
A preset sets the mode, subagent and prompt template ({{input}} is replaced with what you type). If the preset needs a subagent or skill that isn't installed, PerplexiCode offers to install it into the project or globally, or to run without it.
Files are standard: subagents go to .perplexicode/agents/<name>.md (~/.perplexicode/agents for global), skills go to .perplexicode/skills/<name>/SKILL.md. Your own presets are stored in .perplexicode/presets.json, ~/.perplexicode/presets.json or the perplexicodeKilo.taskPresets setting. Later sources override earlier ones in this order: built-in → global file → setting → project file.
The same actions in the terminal:
pcode agents catalog # list catalog subagents
pcode agents add code-reviewer debugger # into .perplexicode/agents (-g for global)
pcode skills add commit-message -g
pcode presets # list task presets
pcode --preset fix-bug -p "login returns 500"
pcode --agent security-auditor -p "audit src/auth"
Screenshots
![]() Welcome screen with Quick start presets |
![]() Task presets: mode + subagent + prompt |
![]() Installed subagents and the catalog |
![]() Skills ( SKILL.md, Claude Code compatible) |
![]() Create your own subagent |
![]() Task run by @debugger |
![]() Modes and subagents ( Cmd+. cycles modes) |
![]() Preset chip in the composer |
![]() Model picker with Max badges and Thinking toggle |
![]() Agent task with todo list, tools and checkpoints |
![]() Edit approval with inline diff |
![]() Commands and follow-up questions |
![]() @ mentions |
![]() Accounts, models, auto-approve, terminal, context, prompts |
![]() Task history |
Screenshots are rendered from the test fixture (npm run test:webview) with sample data.
MCP catalog · 3.4 · Enabled servers may run on the next task; Parrot OS is not runtime-tested
MCP catalog, security and Parrot OS
The MCP tab now includes a curated catalog with searchable Development, Web, Productivity, Security and Pentest categories. Each entry links to upstream documentation and explains its runtime requirements, use case, setup caveats and source-check date. This is a selection of useful integrations, not a measured popularity ranking or a security audit.
- Configuration templates: Project / Global buttons collect parameters in native IDE prompts. Tokens are entered in password inputs and stored in VS Code SecretStorage; JSON files contain only
${ENV_VAR}references. The binding includes the exact config and file, so another server or an edited command/URL cannot silently reuse the saved token. CLI runs supply their own environment variables, not IDE credentials. - Setup guides: Native tools, plugins and integrations requiring additional setup are explicitly labelled Setup guide. They are not presented as one-click installations.
- Security / Pentest: Dedicated entries describe code and dependency checks, threat intelligence, web testing, network inventory and reverse engineering. Read the Security MCP and Parrot OS guide for prerequisites, exact upstream examples and where each tool is useful.
- No execution during installation: Installing a catalog template saves an enabled config only. It does not download software, start a process, scan a target or add permission rules. Your next task can connect enabled servers and download/run the declared npm/uv package, subject to the existing workspace trust guard for project stdio servers. Existing server names are not overwritten.
pcode mcp catalog # all entries, requirements and documentation
pcode mcp catalog security
pcode mcp catalog pentest
pcode mcp install context7 -s user # adds configuration only
pcode mcp install filesystem --set DIRECTORY=/absolute/path/to/allowed/files
Catalog tokens must come from the environment, never --set, --env or --header on mcp install. Use the manual pcode mcp add command after completing a native tool's setup guide. Security tools should run as an ordinary user in a lab or on explicitly authorised targets; Parrot OS compatibility is documented as prerequisites and upstream Linux support, not a claim of VM testing.
.env.example lists the supported token variable names. PerplexiCode does not automatically load dotenv files: export the needed variables in your CLI environment, or use the IDE's native password prompts. Populated .env files are excluded from Git and VSIX packaging.
MCP & compute · 3.3 · Configuration, trust, permissions and execution modes
MCP servers
PerplexiCode speaks the Model Context Protocol the way Claude Code does, so an existing .mcp.json or ~/.claude.json works without changes.
| Config files | ~/.claude.json (root and projects[<folder>]), ~/.claude/.mcp.json, ~/.perplexicode/mcp.json, the mcpServers block of any settings file, <project>/.mcp.json, .claude/.mcp.json, .perplexicode/mcp.json, .mcp.local.json and *.local.json. Later files override earlier ones by server name. ${VAR} and ${VAR:-default} are expanded in command, args, env, url and headers. |
| Transports | stdio (command + args), http (Streamable HTTP) and sse, with custom headers. Server-initiated ping and roots/list are answered and tools/list_changed refreshes the tool list. |
| Trust | stdio servers from the project or .local.json start only in a trusted workspace (Workspace Trust in VS Code, --trust-project in the CLI). User-level and HTTP servers always start. Untrusted servers are listed with the reason. |
| Agent tools | use_mcp_tool, access_mcp_resource, list_mcp_resources, or a direct <mcp__server__tool>{"arg": 1}</mcp__server__tool> call. Connected server prompts appear in the IDE / popup and CLI REPL as /<server>:<skill> [key="val"]. |
| OAuth 2.0 + PKCE | pcode mcp login <server> and pcode mcp logout <server> (or OAuth Login / OAuth Logout in Library → MCP) run loopback OAuth 2.0 + PKCE S256 with RFC 8414 / 9728 metadata discovery, storing tokens in VS Code SecretStorage (IDE) or the OS keychain (CLI) and refreshing automatically on HTTP 401. |
| Permissions | Rules mcp__server__tool, mcp__server__tool(key:glob) / mcp__server__tool({"nested":{"field":"glob"}}), mcp__server__read_resource(uri:glob), mcp__server__*, mcp__server, mcp and mcp(server) in allow / ask / deny. deny rules always win — even when autoApprove.mcp or bypassPermissions is enabled — and fail closed on malformed JSON arguments. |
| VS Code | Library → MCP tab (status, tools, resources, prompts, OAuth Login/Logout, add / remove / reconnect, open the config file), /mcp and /server:skill in the composer, PerplexiCode: MCP: Reconnect Servers, MCP: OAuth Login to Server…, MCP: OAuth Logout from Server…, settings perplexicodeKilo.mcp.enabled and perplexicodeKilo.mcp.extraConfigs. |
| CLI | pcode mcp list \| add \| remove \| get \| test \| login \| logout, --mcp-config <file\|json> (repeatable), --strict-mcp-config, --no-mcp, REPL /mcp [reconnect [name]] and /<server>:<skill>. pcode doctor shows the servers. |
# Supply GITHUB_PERSONAL_ACCESS_TOKEN through your environment before connecting.
pcode mcp install github -s user # official remote service; saves enabled config only
pcode mcp add docs -t http -H 'Authorization: Bearer ${DOCS_TOKEN}' -- https://mcp.example.com/mcp
pcode mcp list # name, type, scope, enabled/untrusted, target, config file
pcode mcp get github # connects and lists tools and resources
pcode -p "list open issues labelled bug" --allowedTools "mcp__github__list_issues"
pcode -p "summarise README" --mcp-config ./ci-mcp.json --strict-mcp-config
// .mcp.json (project) — the Claude Code format
{
"mcpServers": {
"filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] },
"docs": { "type": "http", "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer ${DOCS_TOKEN}" } }
}
}
Compute modes
A compute mode decides how Perplexity runs the request; the model picker still decides which model answers in Search mode.
| Mode | What runs | Plan |
|---|---|---|
search (default) |
Standard query with the selected model, optional Thinking and web search | Free |
light · standard · high · ultra |
Perplexity Computer harness with Claude Sonnet 5.5 · Claude Opus 5.5 · GPT-6.2 Astra · Claude Fable 5.2 (Ultra uses high effort) | Max |
computer |
Computer (ASI) with the ASI variant of the selected model | Max |
research |
Deep Research | Pro |
agentic_research |
Agentic research synthesis | Max |
labs |
Labs / Studio for files, apps and structured artifacts | Pro |
If a mode is not available for your accounts or its quota is exhausted, the request falls back along a chain (Computer harness → Comet browser agent → Search with the closest chat model; Deep Research → Best) and the task log says which mode was actually used.
- VS Code: the compute pill next to the model picker, PerplexiCode: Select Compute Mode, setting
perplexicodeKilo.computeMode(defaultsearch); the status bar shows the active mode. - CLI:
pcode --compute ultra -p "…", REPL/compute [mode],pcode modelslists the modes, andcomputeModein.perplexicode/settings.jsonsets a per-project default.
Additional tools
glob_files (gitignore-style patterns inside the workspace), search_and_replace (literal or regex, optional line range) and web_fetch (HTTP(S) GET with redirects, size limit and HTML → text; rules WebFetch(domain:docs.example.com) and the Web auto-approve toggle).
Headless core & pcode CLI · Permissions, hooks, verification and resumable sessions
The extension and a terminal CLI share one agent core, so you get Kilo Code in the editor and Claude Code in the terminal from one install.
pcode CLI |
REPL with diff approvals and slash commands (/mode, /permissions, /compact, /resume …). Headless pcode -p "…" with --output-format text\|json\|stream-json for scripts and CI. |
| Claude Code compatible config | Reads .claude/settings.json (permissions and hooks), .claude/agents/*.md, skills and CLAUDE.md. Your existing .claude/ folder works as is, next to .perplexicode/. |
| Permissions | allow / ask / deny rules such as Bash(npm test:*) and Edit(src/**). Modes default, acceptEdits, plan and bypassPermissions. Built-in protection for .env, keys and .ssh, including through symlinks and cat .env. |
| Hooks | PreToolUse, PostToolUse, UserPromptSubmit, Stop, SubagentStop, SessionStart, SessionEnd. Exit code 2 blocks the action. JSON decisions are supported. Project hooks run only in trusted folders. |
| Verify before done | verify.command (for example npm test) runs before the task can finish, and a failing check sends the agent back to fix it. Each task ends with a status: verified, needs review, failed, blocked or no changes. |
| Subagents | new_task can delegate to your own agents. Each one has its own prompt, model and tool list, and the tool list is enforced. |
| Resume anywhere | Every IDE or CLI task writes a journal to ~/.perplexicode/sessions. pcode -c continues the last one. Commands that were cut off by a crash are flagged, and the agent checks the real state before re-running them. |
| Fewer round-trips | Up to 5 read-only tool calls from one answer run in one step. |
| Worktrees (3.7) | pcode -w [name] runs the task in an isolated git worktree; pcode worktree list \| apply <name> \| discard <name> brings the result back or drops it. |
| Daemon (4.0) | pcode serve exposes the core over a Unix socket or WebSocket for the IDE — see Remote core. |
| REPL extras (3.6 – 4.0) | !<command>, /rewind [list\|n], /context, /worktree, /<server>:<prompt> and a live timer for long commands. |
| Two transports | Your Perplexity Pro/Max web session, with account rotation (shared with the extension through PerplexiCode: Share Accounts with CLI or pcode login), or any OpenAI-compatible endpoint (--provider openai: Ollama, LM Studio, vLLM). |
git clone https://github.com/MRX7999/PerplexiCode-Kilo && cd PerplexiCode-Kilo
npm ci && npm run build && npm link # puts `pcode` on PATH
pcode login # paste the Cookie header (hidden input) or use --browser
pcode doctor
pcode -p "fix the failing test" --permission-mode acceptEdits --allowedTools "Bash(npm test:*)"
pcode -w -p "migrate to the new API" --cross-review # isolated worktree + cross-model review
pcode worktree apply <name> # copy the result into your checkout
pcode models update # refresh the model list (SHA-256 verified)
pcode doctor --bundle -o diag.json # redacted diagnostics for an issue
Exit codes of pcode -p, stable for CI:
| Code | Meaning |
|---|---|
0 |
Done |
1 |
Runtime error |
2 |
verify.command failed |
3 |
Blocked by a rule, a hook or --stop-on-fallback |
4 |
--max-turns reached |
5 |
Not signed in |
6 |
Worktree apply conflict |
64 |
Invalid arguments (including a secret passed as an argument) |
130 |
Interrupted (Ctrl+C) |
Other flags added in 3.5 – 4.2: --full-auto, --auto-skills, --stop-on-fallback, --repo-map / --no-repo-map, --repo-map-chars <n>, --max-rpm <n>, --max-parallel-subtasks <n>, --cross-review, --cross-review-model <id>. Full list: pcode --help.
See docs/CORE-3.0.md for the full reference and examples/claude-code-compat for a working configuration.
Models · Account discovery, fallback catalog and subscription handling
The model list matches the current Perplexity picker. It is loaded live from your account's model config, with a bundled snapshot (2026-11-27, 133 models) as a fallback.
| Model | Provider | Plan | Thinking |
|---|---|---|---|
| Best | Perplexity | Free | — |
GPT-6.2 Sol NEW |
OpenAI | Pro | ✓ |
GPT-6.2 Astra NEW |
OpenAI | Max | ✓ |
| Gemini 4 Carbon | Max | ✓ | |
Gemini 4 Neon NEW |
Pro | ✓ | |
| Claude Sonnet 5.5 | Anthropic | Pro | ✓ |
| Claude Opus 5.5 | Anthropic | Max | ✓ |
| Claude Fable 5.2 | Anthropic | Max | ✓ |
| Kimi K3 | Moonshot AI | Pro | built-in |
| GLM 5.3 | Z.ai | Pro | built-in |
| Grok 4.7 | xAI | Pro | ✓ |
| Nemotron 3.5 Super VL | NVIDIA | Pro | — |
| More models (121) | Anthropic, OpenAI, Google, xAI, Perplexity Sonar… | Pro / Max | per model |
![]() Featured models |
![]() More models |
When Perplexity adds models between releases, run pcode models update or PerplexiCode: Update Model Catalog from Repository: the new list is applied only if its SHA-256 matches, otherwise the bundled snapshot stays in use.
Max models unlock automatically for Max accounts. If a Max model is picked on a Pro-only account pool, the request falls back to Best. Override plan detection with perplexicodeKilo.subscriptionPlan if needed, and use PerplexiCode: Refresh Models and Quotas after Perplexity adds new models.
Commands & shortcuts · Editor actions and keyboard reference
| Command | macOS | Windows / Linux |
|---|---|---|
| PerplexiCode: Open Agent | Cmd+Alt+K |
Ctrl+Alt+K |
| PerplexiCode: New Task | Cmd+Alt+N |
Ctrl+Alt+N |
| PerplexiCode: Switch to Next Mode | Cmd+. |
Ctrl+. |
| PerplexiCode: Quick Edit Selection | Cmd+I |
Ctrl+I |
| PerplexiCode: Add Selection to Chat | Cmd+Shift+I |
Ctrl+Shift+I |
| PerplexiCode: Add to Context | Cmd+K Cmd+A |
Ctrl+K Ctrl+A |
| PerplexiCode: Explain / Fix / Improve Code | context menu, lightbulb | context menu, lightbulb |
| PerplexiCode: Explain Current File | Command Palette | Command Palette |
| PerplexiCode: Add Terminal Selection to Context | terminal context menu | terminal context menu |
| PerplexiCode: Generate Commit Message | Source Control title bar | Source Control title bar |
| PerplexiCode: Select Model / Mode / Compute Mode | status bar | status bar |
| PerplexiCode: Inspect Task Context… | task header / /context / Command Palette |
task header / /context / Command Palette |
| PerplexiCode: Copy Diagnostics Bundle… | task header / Command Palette | task header / Command Palette |
| PerplexiCode: MCP: Reconnect Servers · OAuth Login to Server… · OAuth Logout from Server… | Command Palette, Library → MCP | Command Palette, Library → MCP |
| PerplexiCode: Remote Core: Connect to pcode serve… · Disconnect | Command Palette | Command Palette |
| PerplexiCode: Update Model Catalog from Repository | Command Palette | Command Palette |
| PerplexiCode: Install Skill from Source… | Command Palette, Library → Skills | Command Palette, Library → Skills |
| PerplexiCode: Toggle Full Auto | Command Palette, Full Auto button above the composer | Command Palette, Full Auto button above the composer |
| PerplexiCode: Compact Current Task · Set Permission Mode | Command Palette | Command Palette |
| PerplexiCode: Share Accounts with CLI (pcode) | Command Palette | Command Palette |
| PerplexiCode: Task History · Settings · Open in Editor Tab | view title bar | view title bar |
| PerplexiCode: Add / Manage Accounts · Set Account Rotation Strategy · Refresh Models and Quotas | Command Palette | Command Palette |
Settings · All defaults, approval controls and context limits
| Setting | Default | Description |
|---|---|---|
perplexicodeKilo.defaultModel |
turbo (Best) |
Model for new tasks. |
perplexicodeKilo.subscriptionPlan |
auto |
Force pro or max when detection is wrong. |
perplexicodeKilo.computeMode |
search |
Default compute mode: search, light, standard, high, ultra, research, agentic_research, labs. |
perplexicodeKilo.mcp.enabled |
true |
Connect to configured MCP servers. |
perplexicodeKilo.mcp.extraConfigs |
[] |
Extra MCP config files or inline JSON, like pcode --mcp-config. |
perplexicodeKilo.agent.autoApprove.enabled |
true |
Master switch for auto-approval. |
perplexicodeKilo.agent.autoApprove.read |
true |
Reading, listing and searching inside the workspace. |
perplexicodeKilo.agent.autoApprove.readOutsideWorkspace |
false |
Reads outside the workspace. |
perplexicodeKilo.agent.autoApprove.write |
false |
Creating and editing files. |
perplexicodeKilo.agent.autoApprove.execute |
false |
Commands matching allowedCommands. |
perplexicodeKilo.agent.autoApprove.modeSwitch |
true |
Mode switches requested by the agent. |
perplexicodeKilo.agent.autoApprove.subtasks |
true |
Orchestrator subtasks. |
perplexicodeKilo.agent.autoApprove.todo |
true |
Todo list updates. |
perplexicodeKilo.agent.autoApprove.retry |
true |
Retry failed Perplexity requests. |
perplexicodeKilo.agent.autoApprove.mcp |
false |
MCP tool calls and resource reads (permission rules still apply). |
perplexicodeKilo.agent.autoApprove.web |
false |
web_fetch requests (WebFetch(domain:…) rules still apply). |
perplexicodeKilo.agent.allowedCommands |
npm test, npm run, git status, git diff, git log, ls, cat, pwd |
Command prefixes that may run without approval (* = all). |
perplexicodeKilo.agent.deniedCommands |
rm -rf, sudo, git push --force |
Prefixes that always need approval. |
perplexicodeKilo.agent.maxRequestsPerTask |
40 |
Ask before continuing after this many requests. |
perplexicodeKilo.agent.maxReadFileLines |
500 |
Lines per read_file call. |
perplexicodeKilo.agent.commandTimeoutSeconds |
120 |
Command timeout, 0 = none. |
perplexicodeKilo.agent.terminalOutputLineLimit |
300 |
Terminal lines sent to the model. |
perplexicodeKilo.agent.webSearch |
auto |
Whether Perplexity may search the web for agent requests. |
perplexicodeKilo.agent.contextStrategy |
auto |
Thread follow-ups or full self-contained prompts. |
perplexicodeKilo.agent.maxPromptChars |
60000 |
Prompt size limit; older turns are condensed. |
perplexicodeKilo.agent.permissionMode |
default |
default, acceptEdits, plan or bypassPermissions — same rules as pcode --permission-mode. |
perplexicodeKilo.agent.hooks.enabled |
true |
Run hooks from .claude/settings.json / .perplexicode/settings.json (project hooks need a trusted workspace). |
perplexicodeKilo.agent.journal.enabled |
true |
Write the session journal to ~/.perplexicode/sessions so tasks can be resumed from the CLI. |
perplexicodeKilo.agent.readBatchSize |
0 |
Read-only tool calls run in one step; 0 uses the settings-file value (5). |
perplexicodeKilo.agent.worktreeEnabled |
false |
Run tasks inside an isolated git worktree from HEAD with strict symlink and git -C confinement. |
perplexicodeKilo.agent.maxParallelSubtasks |
3 |
Maximum concurrent subagents in Orchestrator mode (readers in main tree, writers in isolated worktrees). |
perplexicodeKilo.agent.repoMapEnabled |
true |
Include the structural @repo map (symbols, signatures, imports, related tests) within budget. |
perplexicodeKilo.agent.repoMapMaxChars |
6000 |
Hard character ceiling for @repo. |
perplexicodeKilo.agent.autoCompactThreshold |
0.8 |
Fraction of maxPromptChars triggering structured auto-compaction (0 disables). |
perplexicodeKilo.agent.autoCompactKeepSteps |
4 |
Latest dialogue steps kept untouched during auto-compaction. |
perplexicodeKilo.agent.stopOnFallback |
false |
Stop the task instead of falling back to another compute mode, model or account. |
perplexicodeKilo.agent.crossModelReview |
false |
Run an independent review of the git diff and verify status using a model from a different family before attempt_completion. |
perplexicodeKilo.agent.crossModelReviewModel |
"" |
Optional preferred reviewer model ID for cross-model review (empty auto-selects another model family). |
perplexicodeKilo.agent.autoSkills |
false |
Auto Skill: offer find_skill / install_skill to the agent. Every install asks. |
perplexicodeKilo.agent.fullAuto |
false |
Full Auto: never wait for approval or answers; guardrails are refused instead of asked; clean skills found by find_skill are installed (max 3 per task). User settings only. |
perplexicodeKilo.agent.skillRegistries |
["clawhub", "skills-sh"] |
Registries used by find_skill and Library → Skills → Search online. |
perplexicodeKilo.rotation.maxRequestsPerMinute |
12 |
Conservative per-account RPM cap before rotating or throttling. |
perplexicodeKilo.agent.language |
auto |
Reply language, e.g. en, ru. |
perplexicodeKilo.agent.customInstructions |
— | Instructions added to every mode. |
perplexicodeKilo.agent.modeInstructions |
{} |
Per-mode instructions keyed by mode slug. |
perplexicodeKilo.agent.diffEnabled |
true |
Use apply_diff instead of full rewrites. |
perplexicodeKilo.agent.includeFileListOnStart |
true |
Send the workspace file list with the first request. |
perplexicodeKilo.agent.revealEditedFiles |
true |
Open files after the agent edits them. |
perplexicodeKilo.taskPresets |
[] |
Your own task presets. |
perplexicodeKilo.excludePatterns |
node_modules, .git, dist, out, .next |
Globs excluded from context. |
perplexicodeKilo.remote.url |
"" |
Remote pcode serve endpoint (unix:///path/to/serve.sock or ws://127.0.0.1:4190); bearer token is kept in OS SecretStorage and Perplexity cookies never leave the IDE machine. |
perplexicodeKilo.models.remoteCatalogUrl |
"" |
Custom repository URL for SHA-256 verified bundledModelsConfig.json updates (empty uses the official MRX7999/PerplexiCode-Kilo URL; built-in snapshot stays fallback). |
perplexicodeKilo.models.remoteCatalogSha256Url |
"" |
Custom URL for bundledModelsConfig.json.sha256 digest verification. |
Migrating to 4.0 · Eleven behaviour changes since 3.4 · no settings renamed
Migrating to 4.0
Every perplexicodeKilo.* setting keeps its name, saved accounts stay in SecretStorage, and Claude Code configs (.claude/settings.json, hooks, agents, skills, .mcp.json) keep working unchanged. These are all the incompatible or behaviour changes between 3.4.0 and 4.0.0:
| # | Change | What to do |
|---|---|---|
| 1 | No secrets in CLI arguments. pcode login, pcode mcp install and pcode serve refuse --token and other secrets passed as arguments with exit code 64. |
Use environment variables (PPLX_COOKIE, PCODE_SERVE_TOKEN), --token-env, --token-stdin, the hidden prompt or ~/.perplexicode/serve.token (0600). |
| 2 | Shell commands are checked per segment. Chains (;, &&, \|\|, \|, &, new lines), env VAR=… wrappers and sh -c / bash -c / zsh -c scripts are split, and every segment must pass allow / deny on its own. $(…), backticks, eval and redirections (>, >>, <) always ask. |
Allow rules that relied on the first command's prefix may now prompt — add rules for the other segments. |
| 3 | Agent config edits always ask. Writing or deleting .perplexicode/settings*.json, hook scripts, .mcp.json, .lsp.json and anything under .claude/** needs your confirmation, even with autoApprove.write, acceptEdits or bypassPermissions. |
Nothing to change; expect a prompt for these files. |
| 4 | web_fetch blocks local and private addresses. Loopback (127.0.0.0/8, ::1), RFC 1918 (10/8, 172.16/12, 192.168/16), link-local and cloud metadata (169.254/16, fe80::/10), CGNAT, ULA and .localhost / .internal are refused, including after redirects. |
Reach local services through an explicit MCP server. |
| 5 | Safe resume after a crash. A command cut off before its exit code was recorded (command_unconfirmed) cannot be re-run blindly after pcode --continue / --resume or reopening the task. |
The agent first inspects the workspace with read_file, list_files or search_files. |
| 6 | MCP argument rules beat auto-approve. permissions.deny / ask with argument predicates (for example mcp__db__query(sql:*DROP*)) win over autoApprove.mcp: true; malformed JSON arguments are blocked when such a deny rule exists. |
Review deny rules that used to be bypassed by auto-approve. |
| 7 | Worktrees never merge on their own. --worktree / worktreeEnabled tasks and writing Orchestrator subagents run in separate git worktrees with no automatic merge, commit or push. |
Bring results back with Apply or pcode worktree apply <name>; a conflict leaves your tree untouched and the CLI exits with 6. |
| 8 | Fixed exit codes for pcode -p. 0 done, 1 runtime error, 2 verify.command failed, 3 blocked by a rule / hook / stopOnFallback, 4 --max-turns reached, 5 not signed in, 6 worktree conflict, 64 invalid arguments, 130 interrupted. |
CI scripts that compared against 1 only should check for non-zero or the specific code. |
| 9 | 12 requests per minute per account, optional hard stop on fallback. perplexicodeKilo.rotation.maxRequestsPerMinute defaults to 12. With perplexicodeKilo.agent.stopOnFallback: true (--stop-on-fallback) the task stops with needs you instead of switching mode or model. council mode is not offered because it is not in bundledModelsConfig.json. |
Raise the RPM cap if you run many accounts; turn on stopOnFallback if a silent model switch is unacceptable. |
| 10 | pcode serve security boundary. The daemon never stores or accepts cookies, csrfToken or sessionToken; model calls go back to the IDE through llm/complete, and any message with session fields is rejected (RemoteSecurityViolationError). Project .lsp.json servers start only in trusted folders. |
Use --trust-project for project LSP and hooks on the daemon. |
| 11 | Cmd/Ctrl+I opens Quick Edit. With a selection in an editable file, Cmd+I (macOS) / Ctrl+I (Windows, Linux) runs perplexicodeKilo.quickEditSelection. |
Add Selection to Chat (perplexicodeKilo.askAboutSelection) is on Cmd/Ctrl+Shift+I; rebind in Keyboard Shortcuts if you prefer the old key. |
Build & project layout · Local checks, packaging and release workflow
Requirements: Node.js 20+ and npm.
git clone https://github.com/MRX7999/PerplexiCode-Kilo.git
cd PerplexiCode-Kilo
npm ci
npm run lint # extension + webview type check
npm test # parser, diff engine, tools, models, agent loop, transport
npx vsce package --out perplexicode-kilo.vsix # build the VSIX
npm run test:webview renders the webview in headless Chromium and saves screenshots to out/test/ (needs a Playwright Chromium in ~/.cache/ms-playwright).
Releases are built by GitHub Actions: pushing a vX.Y.Z tag that matches package.json runs lint and tests, packages the VSIX, attaches it with SHA256SUMS.txt to a GitHub release and publishes it to Open VSX and the VS Code Marketplace. canary.yml checks the Perplexity protocol every night.
Project layout
src/
extension.ts activation, commands, code actions, webview providers
agent/ agent loop, modes, prompts, tool parser and executor, diff engine, transport, task store
api/ Perplexity client, model catalog, bundled model config (+ .sha256), quotas, account rotation
core/ headless agent core shared by the IDE, the CLI and pcode serve (permissions, hooks, LSP, worktrees, repo map)
cli/ pcode CLI, REPL and serve daemon
config/ · migration/ settings loading and 1.x / 2.x migration
providers/ login flows
storage/ account manager (SecretStorage)
ui/ status bar
webview-ui/agent/ chat UI (TypeScript + CSS, bundled with esbuild)
test/ unit and agent tests, webview render harness
scripts/ install.sh, install.ps1 (SHA-256 verified)
docs/ CORE-3.0.md, screenshots and diagrams
.github/workflows/ CI, release and nightly canary
Troubleshooting · Authentication, installation and task recovery
| Problem | Fix |
|---|---|
| Max models are locked on a Max account | Run Refresh Models and Quotas, or set perplexicodeKilo.subscriptionPlan to max. |
401 / session expired |
Manage Accounts → refresh session, or add the account again. |
The CLI says NOT registered |
Harmless Antigravity warning; check --list-extensions --show-versions. |
| Install script cannot find the editor | Pass --vsix with a downloaded file, or use Install from VSIX…. |
| Agent stops after many steps | Raise perplexicodeKilo.agent.maxRequestsPerTask. |
| A command still asks with All commands (*) ticked | The command runs a program chosen at run time ("$bin" --version), or uses case, a shell function, [[ … ]] or { …; }, so it cannot be checked against the allow and deny lists (rule shell.unparseable). Approve it, or turn on Full Auto for unattended tasks. |
Full Auto shows Blocked / [DENIED] [Full Auto] |
A guardrail refused the action (the rule is in the message): a denied prefix, sudo, a protected config, a permissions.ask rule, an edit outside the workspace, or a skill that was not found by find_skill or did not scan clean. Do it yourself, or change the rule in your user settings. |
| Task sits at 0 requests with no folder open | Open a project folder. Since 4.0.2 a task in the home directory skips the start-up file list and the @repo map, so it no longer stalls on ~/Library or iCloud folders. |
Connection timed out / Connection failed: could not connect to www.perplexity.ai |
Your machine cannot reach www.perplexity.ai over TCP. Check with curl -sv -m 20 -o /dev/null https://www.perplexity.ai/, then your VPN, proxy or router exclusions. Since 4.0.2 network errors no longer mark the account as failed, so you will not see No active Perplexity account afterwards. |
| Task stopped with needs you after a fallback | stopOnFallback is on and the requested mode or model is not available for your accounts. Pick another one or turn the setting off. |
pcode exits with code 64 |
A secret was passed as an argument (for example --token). Use PCODE_SERVE_TOKEN, --token-env, --token-stdin or the hidden prompt. |
lsp says No LSP servers configured (CLI) |
Add the server to .lsp.json or ~/.perplexicode/lsp.json; project files also need --trust-project. |
| Catalog update says the hash does not match | Nothing changed — the bundled snapshot is still used. Check remoteCatalogUrl / remoteCatalogSha256Url point to the same commit. |
| Remote Core cannot connect | Check the endpoint and token (~/.perplexicode/serve.token), and that the socket or SSH tunnel exists. The IDE stays in local mode until it connects. |
pcode skills install says HTTP 403 / rate limit from GitHub |
GitHub's unauthenticated limit is 60 requests per hour. Export GITHUB_TOKEN (a token with no scopes is enough for public repositories) and retry. |
| A skill install says blocked by the scan | The skill contains a high-risk pattern (listed in the message). Read the files at the pinned link; install it only if you trust it (--allow-risky / Install anyway). |
pcode skills verify reports modified |
A file in an installed skill no longer matches skills-lock.json. Reinstall with pcode skills install <source> --force or keep your edit. |
| Something else | pcode doctor --bundle or Copy Diagnostics Bundle… — attach the redacted file to an issue. |
Unable to write to User Settings … is not a registered configuration |
The extension was updated while the window stayed open. Run Developer: Reload Window. Since 2.1.0 the change is saved anyway and moved into settings after the reload. |
| Anything else | Open Output → PerplexiCode and attach the log to an issue. |
Credits, disclaimer & license · Unofficial community project, subscription limits and MIT terms
Credits
- Original extension: yuki-20/PerplexiCode (MIT).
- Agent design, modes and tool protocol follow Kilo Code, itself based on Roo Code and Cline.
Disclaimer
PerplexiCode is an unofficial community project and is not affiliated with or endorsed by Perplexity AI, Kilo Code or Google. It uses your own Perplexity web session; usage counts against your subscription limits and is subject to the Perplexity Terms of Service.
License
MIT. Original work © yuki-20; PerplexiCode Kilo changes © MRX7999.





















