Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>PlaitCodeNew to Visual Studio Code? Get it now.
PlaitCode

PlaitCode

PlaitCode

| (0) | Free
A secure coding agent for VS Code with DeepSeek: approval-controlled workspace tools, plan-tracking task lists, copyable local/server commands and durable local history.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PlaitCode

English · 中文

PlaitCode is a local-first coding agent for VS Code with a DeepSeek / OpenAI-compatible backend.

It ships a compact chat surface and settings page, native streaming tool calling, local skills, file attachments, permission presets, plan-tracking task lists with archived snapshots, terminal commands labelled with where they run and which shell to use, archived history and crash-resilient chunked storage. The chat lives in the VS Code secondary sidebar, so it never takes over an editor tab.

PlaitCode chat panel: conversation sidebar and a new conversation

What's new in 0.5.0

Renamed: HWChat → PlaitCode.

HWChat was short for honor-world chat, and the honor-world word mark could not be registered — it conflicts with HONOR. Keeping that name would stay a liability on the Marketplace and in any public material. So the project moved to a clean name: PlaitCode (plait = to weave several strands into one cloth) with plaitcode.com.

One thing to do: uninstall the old extension and install the new one.

code --uninstall-extension honor-world.hwchat
code --install-extension plaitcode-0.5.0.vsix

The extension ID changes from honor-world.hwchat to plaitcode.plaitcode, and command/setting prefixes change from hwchat.* to plaitcode.*, so old keybindings and workspace settings are not carried over (search for plaitcode in Settings to re-apply).

What's new in 0.4.29

Phone control: drive both computers from your phone

On the same WiFi, scan the QR code in the Phone control panel (or type the 6 digits) and the team group opens in your phone browser:

  • Send a requirement as the client — both devices pick it up and work on it together;
  • Answer questions — a pending question sits in a yellow banner at the top; your reply joins the same requirement;
  • Watch progress and results — who said what, and how far each side got;
  • Approve tool permissions (can be switched off in one click) — when a tool wants to run a command or write a file, the card also appears on the phone; whichever side taps first wins.

Entry points: command palette "PlaitCode: 手机遥控(扫码)", Settings → Collaboration → Phone control, and the status bar item. It works on a single machine too — no second computer required.

Security is closed on purpose: the 6-digit code is single-use, five wrong attempts lock the source for five minutes, sessions last 12 hours, the cookie is HttpOnly + SameSite=Strict, and state-changing endpoints additionally require a custom header that a cross-site form cannot set. LAN traffic is plain HTTP, so only same-WiFi devices are accepted; cross-network use needs a tunnel (see docs/MOBILE-CONTROL.md).

What's new in 0.4.28

Which box counts: what you write in the group window applies to both devices (and is broadcast); what you write in the main chat goes to the local agent only and is never synced (you get a one-time notice). If the two disagree, the latest agreement in the group wins — an agent must not silently implement a different version.

The team group gets its own window (your chat stays clean)

The split is now explicit: the main chat only carries your own agent's work — group messages no longer get interleaved into it. The team group window carries the whole conversation between you and the two agents, while docs/TEAM-CHAT.md keeps the transcript and docs/PLATFORM-ALIGNMENT.md keeps the per-platform state.

The group window is a real chat surface, not a cramped list:

  • header with connection status and member cards (you, the local agent, the remote agent);
  • two-sided bubbles — yours on the right, the agents' on the left — each with a phase tag and time; questions outlined in yellow, results in green so they stand out;
  • a banner that appears whenever an agent is waiting for your answer, quoting the question;
  • a multi-line composer (Enter sends, Shift+Enter adds a line) and a toolbar for the ledger, connection state and advanced settings.

Three entry points: the chat panel title bar, Settings → Collab → Open team group, and the notification button when an agent asks something.

What's new in 0.4.27

A team group: you are the client, the two agents are contractors who clarify before building

You do not write code, so a requirement must never be guessed at. LAN collaboration is now a group with a fixed order: analysis → questions → confirmation → execution → result.

You are the 甲方 (client); the agents on both devices are the 乙方 (two product managers, one per platform). You state a requirement on either machine:

  1. Each agent posts a requirement analysis in plain language: what you will see happen, which screen changes, what counts as done — with no variable names, file names, frameworks or function names.
  2. If anything is ambiguous (scope, priority, which screen, whether the other platform must match, how you will verify it), it posts questions as concrete either/or choices and stops to wait. It never guesses, and never "builds a draft and fixes it later".
  3. After you answer it continues; once nothing is unclear it posts a one-paragraph confirmation, and only then starts implementing.
  4. When done it posts the result in plain language: what changed, how you can check it yourself, and any platform differences.

What keeps it controlled: questions always stop the run, at most one consolidated question message per requirement, teammates do not repeat each other's questions, your answer is recognised as an answer (not a new requirement), and both agents resume when you answer.

Two files record everything: docs/TEAM-CHAT.md (who said what, grouped by requirement) and docs/PLATFORM-ALIGNMENT.md (how far each platform got).

What's new in 0.4.23

The run now finishes the task list before it stops — and stops pretending it did the work

Three reports from real use, each traced to a different root cause.

"It stops before finishing the task in the panel — every time." Even with max steps: unlimited, the loop ended as soon as the model answered without calling a tool, and nothing ever compared that against the task list — so a run could wrap up with five items still unticked. Now, when the model tries to close the run while the list still has unfinished items, the agent puts the list state back in front of it with an explicit "keep going, verify, then tick" instruction and continues (at most 3 nudges, so a stubborn model cannot spin forever). For the finite step presets, an exhausted budget also extends itself while the list is unfinished. Loop / repetition / no-progress / stop-button guards are unchanged — "finish before stopping" is not "never stops".

"A one-line task (translate a page, switch the language) ran hundreds of commands and still was not done." Measured from the local history of that exact run: 207 tool calls, including read_file Icon.tsx 53 times, read_file Gate.tsx 31 times and the same Get-Content command 51 times. The loop guard only counted consecutive identical calls, so alternating between two files reset the counter every time. The guard now also compares output: the same call (tool + normalized arguments) returning byte-identical results three times is blocked with an instruction to change approach (search_files, read a smaller range, or edit the file). Four such blocks in one run stop the agent with a stalled notice instead of burning hundreds of calls. Judging by output means "read → edit → read again" is never punished — the content changes, so the counter resets.

"It often fakes the work: says it is done, and nothing was executed." A fully ticked list is archived into a capsule immediately, which reads as "finished" — and the old code only required the model to submit that list. update_todos now requires evidence: turning a list from unfinished to fully completed needs at least one successful tool call other than update_todos in that run (reading, writing and running commands all count, so read-only tasks are unaffected). Without it the update is refused, nothing is written, and the model is told to actually do the work first. Re-submitting an already-complete list is not affected. The system prompt and task-list rules gained the matching hard rule: a self-written check script, a plan, a summary or a read-only look is not "done".

What's new in 0.4.24

"Not found" is not a failure, and a regex is not a path

Two more executor bugs came back from the same session — 13 commands were enough to stop the whole run:

  • Exit code 1 from a search command means "no match", not failure. findstr / grep / rg return 1 with empty output when nothing matched; that used to be counted as a failed step with no output, so three "not found" results in a row stopped the whole run. It is now a successful negative result (with a note saying so), and real errors (grep: …: No such file) still fail because they write to stderr.
  • A regex literal is no longer treated as an absolute path. A script containing /\r?\n/ was rejected with "path /\r?\n/ is outside the current workspace". Any candidate shaped /…/flags whose body contains regex metacharacters is skipped, while real paths such as /etc/hosts or /tmp/ are still checked.

Token economy: windowed reads, head+tail output, pinned working set

Three measurable gaps behind "why is Copilot Chat so smooth and PlaitCode so heavy":

  • read_file returned whole files — one index.css (231.6 KB) is ~60k tokens in a single request, which was then folded out of the context, so the model read it again: the same file was read 53 times in one run. Reads now always come back with line numbers and a 600-line / 48 KB window, plus an explicit "continue from startLine=N" hint. Small files are unchanged apart from the line numbers.
  • Command output kept only the beginning — up to 200 KB, head 75% only, which cut off the failing tests and the final error line, so the model re-ran the command (the same command ran 51 times). Output is now capped at 32 KB for the model and keeps both the head and the tail with an explicit "bytes omitted" marker plus concrete narrowing advice (| Select-Object -Last 100, | Select-String).
  • Context folding kept only the last 3 tool payloads — reading a fourth file dropped the first, and coming back to it meant re-reading, which dropped another. pruneToolPayloads now pins the latest payload of up to 4 files (≤ 64 KB total), preferring paths the model has returned to, and only folds them when the total budget genuinely requires it.

Fixing the entry point instead of the model: argument normalisation

You cannot always switch to a stronger tool-calling model, so the near-misses are repaired before the tool runs. normalizeToolArguments maps the shapes weaker models actually produce onto the real schema: file / filePath / file_path → path, start_line → startLine (with "10" → 10), oldString / newString → oldText / newText, Claude-style pattern / replacement → oldText / newText for replace_in_file (and to query for search_files, glob for list_files), "true" → true, and a number passed as a path becomes a string. Aliases only fill a missing argument — they never overwrite a value the model actually wrote — and body text such as oldText is never trimmed, because its whitespace is part of the exact match.

A missing argument now says what was received and tells the model to retry the same tool instead of switching tools to work around it, and replace_in_file / run_command carry a one-line argument list plus a minimal JSON example.

What's new in 0.4.26

LAN cross-platform alignment: request on one device, run on both

Building a Windows and a macOS version of the same app usually ends with one side shipping a feature the other forgot, or two implementations that quietly differ. This release adds an opt-in LAN collaboration feature: two devices on the same WiFi share a feature request, execute it on both sides, and maintain one alignment ledger.

Setup — three steps, no code to type:

  1. Install the extension on both machines and open the project folder;
  2. On either machine click 「连接另一台设备」 in the status bar;
  3. Click the same button on the other machine. The first one waits, the second finds it, and the waiting machine shows one dialog: “「MacBook · macOS」 wants to connect. Allow?” Click Allow and you are connected.

After that the connection is remembered and restored on the next window. No pairing code and no IP address to type (both remain available under Advanced).

What it does:

  • Shared requirements — broadcast the moment you send. The peer implements the equivalent feature for its own platform (and says why when the platform cannot do it) instead of copying platform-specific code.
  • Progress reports — the peer reports done / in_progress with the files it changed and its conclusion; a stopped or failed run is never reported as finished.
  • Teammate chat — a new eam_sync tool (send / sk / status) lets the two agents tell each other things like "I made the title bar custom-drawn, do you want to match the padding?" without touching code just to answer.

Alignment ledger — docs/PLATFORM-ALIGNMENT.md is generated automatically as a requirement × platform table, plus a section listing every requirement one side completed and the other explicitly skipped, with the reason. It lives in the repo, so both people and agents can read it.

No infinite ping-pong — only a message that actually asks something triggers a run on the peer; the prompts forbid "got it / thanks" replies; and messages that arrived via sync are never re-broadcast.

Security — every request carries the pairing code (compared without early exit), bodies are capped at 80 KB, malformed payloads are dropped silently, and nothing is exposed outside the LAN.

What's new in 0.4.25

The real difference: dozens of tools were sent on every request

Copilot Chat only hands the model a curated set (a dozen or so tools with short names and small schemas). PlaitCode used to convert every language-model tool registered by every VS Code extension into a plaitcode_vscode_* tool and send them all — the limit was literally 400, i.e. none. With Copilot and other extensions installed that is dozens of tools and thousands of characters of JSON schema on every request, and a good share of those bridged tools cannot work at all in PlaitCode's invocation context.

Now toolSurface.ts decides by intent: bridged tools are only included when the message explicitly needs an extension-side capability (browser, web preview, terminal, command palette, symbol navigation, extension-provided commands). Everything else gets the native tool set only — open_file, read_file and run_command already cover day-to-day work. A bridged tool that already succeeded in this conversation stays available, and if the list still grows past 28 entries the bridged ones are dropped first. The log shows the result: [tools] 35 → 23 (bridged tools hidden: not requested).

Fewer characters per round, and no more cache-busting every round

With the same model, smoothness comes down to two things: how many tokens each round must read, and whether the server can reuse its cached prefix.

  • The prompts that ship every round are shorter. TODO_LIST_PROMPT, NOTICE_PROMPT and REPLY_SHAPE_PROMPT kept every rule but lost their repeated explanations — together about 5,600 → 4,500 characters, paid on every round of every task.
  • Context folding now happens in batches. DeepSeek caches by prefix, so changing an early message invalidates everything after it. The old code folded the oldest tool payload once per new result — precisely at an early position — so every round broke the cache, making a 20-step task 20 full recomputations. Folding now waits until keep + 6 payloads accumulate and then folds down to keep at once; a separate 160 KB live-budget check handles genuinely large outputs. The rounds in between keep an identical prefix and actually hit the cache.

Skills load on demand instead of shipping their full text

Enabling a skill used to inline its entire SKILL.md into the system prompt, and the system prompt is re-sent on every round — local skills are typically 10–40 KB, so one 40 KB skill cost ~800 KB of repeated input across a 20-step task.

Now agent and plan modes get a manifest only (id, name, summary, when to use it, trigger words) and the model calls load_skill before acting; the full text enters the conversation only when it is actually used. Chat mode still inlines the text, because that mode has no tools and could never load it. The manifest itself is capped at 8 KB — extra skills are summarised as "N more, load by id" while every selected id stays loadable — and the "used" badge now only appears for skills that were really loaded.

What's new in 0.4.22

Another group of bugs that made working commands look like failures

After 93 commands a task was stopped with "3 rounds of tool calls all failed" — checking them one by one, only one was a real failure:

  • a; b chaining: cmd treats ; as an argument separator, so git log --oneline -3; git stash list becomes git log "-3;" (fatal: '3;': not an integer). Such commands now go to PowerShell; quoted semicolons and commands using & / && / %VAR% are untouched.
  • Out-String / Format-Table were not detected as cmdlets: detection now matches any standard Verb-Noun instead of a hand-written list.
  • Chinese output from node … 2>&1 | Select-Object came out as mojibake: PowerShell decoded the native command's UTF-8 stderr as GBK, splitting one stream into two encodings. Commands routed to PowerShell now start by pinning its console encoding to UTF-8.
  • Exit code 1 while the command actually succeeded: an error swallowed by -ErrorAction SilentlyContinue still flips $?; that exit code no longer counts as a failure (the result says so explicitly).
  • "3 rounds all failed" now only counts failures that returned nothing at all: output means the tool is working. Windows exit codes are too unreliable to serve as evidence that "the environment is broken".
  • pnpm failing because corepack is missing: the hint now gives npm run <script> / npx pnpm@<version> / npm i -g corepack as concrete next steps.
  • Autopilot and Full access no longer prompt for "suspected credentials": reading a login page (password: newPassword, a variable reference) used to raise a confirmation card. Content scanning now only prompts under Ask every time / Ask on risky actions; the other presets just append a note. The false positive itself is fixed too (an unquoted bare identifier counts as a variable reference). Full access no longer asks before reading sensitive files either — use Autopilot (which blocks them outright, without a prompt) if you want that guard.

What's new in 0.4.21

A message sent mid-run now interrupts the task the way Copilot does, then re-analyses and continues

Sending a message no longer waits on a "related or separate?" classification first — it steers the current run: the message joins the current branch synchronously, the pause signal follows immediately, and the agent stops what it is doing (the answer being generated is cut at once; a batch of commands halts as soon as the running one finishes and the rest are marked paused). The partial text stays in the conversation, so the model knows exactly where it stopped and your bubble is not silently truncated.

It then re-reads the whole picture — goal, task list, completed steps, what it was doing when interrupted, your message — and calls update_todos with the adjusted full list before continuing (keeping completed items, dropping stale steps that conflict with the new request, adding new ones). Work it decides to do later is written into the list instead of being silently dropped — you never end up with a message that quietly sits in a queue.

The pause never kills the command that is already running (a half-written file or half-run migration is worse than a few seconds of waiting), but it stops the moment that command ends, and a toast tells you the run was paused for analysis. Stopping the run still wins over a pause. Every message stays an individual node in the task tree (shown as merged when sent mid-run), so you can always see when you stepped in.

This release also fixes a group of encoding bugs that made the agent fail for no good reason — or lose data: command output, workspace files and fetched web pages are no longer mojibake.

  • Command output: Chinese errors from dir / findstr (系统找不到指定的路径) used to come back as ϵͳ�Ҳ���ָ����·����, so the model could not read the error, retried the same command, and stopped after three failed rounds. Output is now decoded with its real encoding (GBK / UTF-8 auto-detected), and a round interrupted by a new message no longer counts as a failure.
  • Workspace files: the tools used to read as UTF-8 and write as UTF-8. For a GBK file that not only read as garbage — writing it back destroyed the file's Chinese text for good. Files are now read and written with their own encoding; because GBK has no usable encoder here, such a file is refused for editing with an actionable message (re-save as UTF-8), never silently corrupted. UTF-16 files work too.
  • Web pages: GBK / GB2312 sites no longer come back as a page of garbage; both content-type and <meta charset> are honoured.

Three more bugs that made commands fail for no good reason are fixed too:

  • A PowerShell pipeline is no longer parsed by cmd: powershell … -File x.ps1 2>&1 | Select-Object -Last 25 used to be split by cmd and exit 255; such a line now goes to PowerShell, and bare cmdlets like Select-Object trigger the switch automatically (plain cmd commands are untouched).
  • A policy denial no longer counts as a failed tool round: sensitive-file and approval denials, and skipped steps from a pause, no longer push the agent toward the "3 rounds all failed" stop — only real errors in a round with no successful step do.
  • -Filter '*.pfx' is treated as a mask, not as reading a certificate: directory listings are no longer blocked by the sensitive-file guard, while commands that really read id_rsa and friends are still blocked.
  • A guessed documentation URL no longer stops the whole task: an HTTP 404/403 from fetch_url is a definite answer from the server, not a network failure, so it no longer counts toward the "3 rounds all failed" stop — and the result now says what to do next (do not invent paths; use search_web to find the real address). 408 timeouts and 429 rate limits still count as environmental.
  • cmd-style & chaining is no longer handed to PowerShell: cmd1 & cmd2 and a && b stay on cmd (PowerShell only understands ;); only a real pipeline outside quotes switches shells, and a cmdlet used inside cmd chaining now returns an explanation plus the two correct ways to write it.

What's new in 0.4.14

Project decision record: earlier decisions stop getting lost

The diagnosis was right, and it is structural: task-tree memory lives in the extension's storage per conversation — nothing is stored in the project. Even inside one conversation it is truncated (40 finished tasks, 100 chars per line, only 3 constraints), and "continue in a new chat" carries a ≤10,000-character digest. So once the conversation grows or you start a new one, earlier decisions are gone — and the same thing gets reworked.

Now:

  • One file, recognised by marker: docs/PLAITCODE-PROJECT-NOTES.md (project root when there is no docs/), with <!-- plaitcode:project-doc v1 --> in the header. Renaming or moving it will not create a second copy.
  • Append-only: the model supplies entries, the extension does the read-modify-write — the file is never "summarised" by the model, which would eat the old decisions it exists to protect.
  • Five sections: hard conventions / settled decisions / rejected approaches (do not retry) / done (do not redo) / open work — the fourth is written by the host automatically. "Rejected approaches" is the one that stops the loop.
  • Created only after a real file change (changedFiles), so projects PlaitCode never touched gain no file.
  • 8KB injected per turn, dropping the oldest entries with an explicit note; secrets are masked before writing and appends hold a cross-process lock.

One row in Settings under Permissions & privacy: maintain automatically / ask before each write / off, machine-scoped (a cloned repo cannot turn it on for you).

Verified: 1,316 unit tests + 79 guard scripts green (at the time of 0.4.14).

The project badge showed a project name for a brand-new conversation (reported on Windows)

After installing 0.4.12 on Windows, a new conversation showed Personal Workstation OS where it should show "No project yet".

  • Root cause: path resolution infers "with a single root there is no ambiguity" (roots.length === 1 ? roots[0] : undefined) — legitimate for git and relative paths, but the badge treated that guess as "this conversation belongs to that project", painting a guessed folder name as fact.
  • Why only on Windows: a multi-root workspace never hits that inference, so macOS kept showing "No project yet"; Windows with one folder open always hits it.
  • Fix: the two are now separate. Path resolution keeps the inference; the badge goes through badgeBinding(), which only accepts evidence — an explicitly stored projectRoot, or a project actually touched. No evidence means "No project yet".
  • Hint text corrected too: it claimed git writes would be refused, which is not true in a single-root workspace.

Verified: 1,307 unit tests + 78 guard scripts green, including the new check-project-badge-binding.mjs, verified in reverse (re-adding the old logic turns it red).

What's new in 0.4.15

The decision record, finished properly: the host records work itself, and the model is told from turn one

0.4.14 only created the skeleton and relied on the model calling the tool. Three holes closed here:

  • The host appends finished work itself. Previously a single missed call meant that piece of memory was gone forever. At the end of every run the extension reads completed tasks from the task tree, attaches the files this run actually changed, and appends them to a new "Done — do not redo" section. Any failure is swallowed: the record must never break run teardown. The rule still holds — a run that changed no files writes and creates nothing.
  • Deduplicated by title, so re-running the same task (different summary, different files) does not leave two entries.
  • The system prompt mentions the file from turn one. The old note was only attached when a document already existed, so on a fresh project the model never knew where to write — and turn-one decisions were lost.

Verified: 1,318 unit tests + 79 guard scripts green; the guard was reverse-checked by removing the teardown call.

What's new in 0.4.12

About the version number: the last Marketplace release was 0.4.11. Development kept three notes (0.4.12 – 0.4.14); they are published as a single version — the three sections below are all of 0.4.12.

This release fixes two kinds of "it just stopped": a healthy run aborting itself, and a conversation that grows long with no warning and no way out.

Request budget: fold the oldest tool outputs when over

Per your choice (A): when over budget, fold the oldest tool outputs first, keeping conclusions and the most recent turns.

  • Pruning used to be count-based only (keep the last 3 payloads) — but "three" and "how big" are different things; three at the 200KB cap is 600KB.
  • It now prunes by count, then by total bytes (same measure as the gauge), folding from the oldest until it fits.
  • The newest payload is never folded; folding drops only the raw text — status, summary and changed files stay.

Conversation length gauge + "Continue in a new chat" (was 0.4.14)

The panel only ever showed a cumulative billed token count (that 1.03M figure). That is not context length — it tells you nothing about how close the conversation is to not fitting.

  • A length gauge whose measurement matches the real request (message text plus attachment text; image base64, tool executions and reasoning are excluded). Three states: normal / warn at ≥70% / over at ≥90%.
  • When over, a "Continue in a new chat" button appears: it creates a new conversation that references the current one's digest, reusing the existing continuation link — compressing the conversation by starting a fresh window. The original conversation is untouched.

Verified at that point: 1,299 unit tests + 77 guard scripts green, including three real Chromium states (9% / 78% / 148%) where the over state actually clicks the button.

A dropped connection (terminated) no longer ends the agent (was 0.4.13)

A perfectly normal run (44 commands, 6 files changed) stopped mid-way with "request failed: terminated".

  • terminated is the generic error undici throws when the socket is closed early by the peer; the word itself says nothing.

  • Worse, it was classified as a business failure, so the whole turn ended. The user's experience: "it was running fine, then interrupted itself".

  • Transport drops are now recognised: terminated / other side closed / socket hang up / premature close, plus UND_ERR_SOCKET / UND_ERR_CLOSED / ECONNRESET / EPIPE / ECONNABORTED (including undici's cause-wrapped form). These count as an interruption: content, steps and unstarted messages are kept, and replying "continue" carries on.

  • One automatic retry when nothing was emitted yet (the screen is still blank, so resending is safe). If content already streamed, it does not retry — that would duplicate text on screen.

  • SSE parsing moved inside the retry loop so a retry actually resends the request body.

Verified: two new real-stream tests (drop before the first chunk → second request succeeds; "half a sentence" then drop → no retry). 1,294 unit tests + 76 guard scripts green.

Idle timeout scales with the request size (was 0.4.12)

A run reached 1.03M tokens, then failed with "no new data for 120s (idle timeout / stalled:mid-stream)" and the agent stopped.

The cause was not the network: the same 120-second window was applied to requests of every size. Bigger request, slower first token — and during that silence nothing arrives at all. The fixed 120s fired first. Worse, it was treated as a failure, so the user believed the work was lost.

  • Idle window scales with the request (new src/core/requestBudget.ts): allowed silence = base timeout + prefill time (a conservative 2,000 tokens/s), capped at 600s. A 3 KB request still gets 120s; 1.03M tokens gets 600s; a larger "request timeout" in Settings always wins.
  • Stall before the first token retries once (nothing was received, so resending is safe); only a second stall is reported.
  • A stall is an interruption, not a failure: content already written, steps already executed and unstarted messages are all kept — reply "continue".
  • The message now says exactly that, and mentions that the idle window widened automatically.

Also fixed: when run_command's cwd pointed at a parent of the workspace roots, the error was a bare "the path must be inside the workspace" and the model could only keep guessing. It now lists the available workspace roots and states that a shared parent folder is not part of the workspace.

Verified at that point: 1,291 unit tests + 76 guard scripts green, including the new requestBudget.test.ts and the "stall counts as interruption" assertion.

What's new in 0.4.11

The third instance of the same inconsistency: web tools ignored the preset

The previous release removed two hidden tightenings, but the same problem existed once more, in the opposite direction: web tools were hard-coded to "allow", justified by "whether to go online is decided by the 'internet reference' switch". That switch only decides whether the run may use the network — not whether this preset should ask. So under "Ask every time", reading an external page never asked, contradicting the table's "Read: Ask".

Web tools now share the read column: "Ask every time" asks, the other three presets do not. The promise line in Settings gained a third hard limit: web tools are unavailable unless "internet reference" is on (that is an authorisation switch, not a prompt).

Verified: 1,284 unit tests + 76 guard scripts green, with assertions that fetch_url asks 1 / 0 / 0 / 0 times across the four presets.

What's new in 0.4.10

The permission preset stopped matching reality (reported 2026-11-09)

Two hidden layers in the execution path turned the preset's Allow into Ask:

  1. Taint downgrade — after a run read any external page, every later command and write was confirmed. Audit log from the real conversation (conversation_c772072c): every run_command at 09:30–09:35 was auto-approved; after the first successful fetch_url at 09:36:15, every one of them asked — including cd … && grep … | head, which only reads. The user had selected Autopilot and had to click a dozen times.
  2. Forced confirmation for auto-executed files — writing .vscode/tasks.json or a postinstall hook asked even when the preset allowed writes.

Both came from review recommendations, but the effect was: a gate the user believed they had closed opens by itself. That is worse than having no gate — the setting no longer predicts what the UI does.

Changes

  • Both hidden rewrites are gone. execute() now just calls checkAccess(..., policy, ...) and approvalRequired = policy === 'ask', with policy taken straight from PERMISSION_PRESET_PROFILES — the table in Settings is the single authority.
  • The auto-executed-file knowledge is kept, but only as a note: when the preset already asks, the detail line mentions it; when the preset allows writes there is no card and no note. It no longer decides whether to ask.
  • Read-only detection is now a real per-segment parse (shellSegments), so cd X && grep … | head -20; echo …; rustup target list is correctly classified as read-only instead of being pushed to "regular command" just because it contains &&, | or ;. Anything unparseable (command substitution, variables, subshells, input redirection, any redirection other than /dev/null) is not auto-approved.
  • The line under the preset table in Settings now states a checkable promise: nothing beyond this table tightens or loosens the rule. The only two hard limits (untrusted workspace, paths outside the workspace) are outright denials with a reason, never a surprise prompt.

Proof (src/test/toolExecutor.test.ts)

  • New "preset matches behaviour" test: expectations are read from PERMISSION_PRESET_PROFILES, covering all four presets × seven action classes (read file, read sensitive file, write file, write auto-executed file, read-only command, regular command, dangerous command).
  • Verified in reverse: re-inserting a hidden "Autopilot turns read-only commands into Ask" override makes it fail immediately with autopilot/只读命令(git status):预设说「自动允许」,实际仍要求确认.
  • Two cases built from the actual report: the exact command from the screenshot asks 0 times under Autopilot, and a second command in the same conversation is unaffected by the first.

Verified: 1,283 unit tests + 76 guard scripts green.

What's new in 0.4.9

A table in the chat rendered with its columns squeezed to one character per line — rows 500px tall, and the last column pushed outside the panel where scrolling could not reach it.

  • Root cause: a file-reference chip inside a table cell had been verified to an absolute Windows path (the file lives in a different workspace root, so there is no relative form), and .file-ref's label is white-space: nowrap — so the chip's minimum width was the whole path (676px measured). Auto table layout takes each column's minimum width first: the other columns hold Chinese text, whose minimum width is a single character. Measured result: table 797px inside a 661px container, column widths 33 / 33 / 697 / 33, row heights 515 and 422, the fourth column outside .message-viewport (which is overflow-x: hidden, so it could not be scrolled into view).
  • Fix 1 (main): inside table cells the chip now shows only the file name (vaultInitializationPolicy.ts). The full path stays in the tooltip and clicking still opens the file. References in normal prose are unchanged — they still show the full absolute path as designed.
  • Fix 2 (backstop): chips in table cells are capped at 20em, in case the file name itself is long. Bare (non-backticked) paths in cells go through the same dense path.
  • Tried and rejected: direction: rtl to get left-side ellipsis. It is actively harmful — a POSIX absolute path starts with /, a neutral character that RTL reorders to the end, so /Users/x/README.md renders as …/README.md/ and looks like a directory. The guard script now forbids it.
  • Measured after the fix (headless Chromium, same content): at 683px the columns are 50 / 117 / 255 / 239 with 51px rows; at 420px rows are 143px (normal wrapping in the single-column layout); no horizontal overflow at any width.

Verified: 1,276 unit tests + 76 guard scripts green, including the new test/check-table-layout.mjs (static contract + real Chromium measurements at three widths, also proving it fails without the fix).

What's new in 0.4.8

About the version number: the last Marketplace release was 0.4.7. Development kept five separate notes (0.4.8 – 0.4.12); they are published as a single version, and the five sections below are all of 0.4.8.

Almost every fix here is invisible when it works: a security gate that could be bypassed, two windows overwriting each other's archive, a compromised webview approving itself, attachments landing in the wrong conversation. Each one was reproduced before it was fixed, not inferred from reading code.

Webview boundary and run/draft ownership (was 0.4.12)

Webview boundary (⑫) and run/draft ownership (⑨). Both start from a premise that was never written down before: the webview may already be compromised, so the host must not treat its messages as trustworthy.

  • Inbound messages are validated at runtime. src/core/incomingMessage.ts registers all 54 message shapes; onDidReceiveMessage validates before dispatch and drops anything malformed (with a log line). Previously { type: 'togglePin', pinned: 'false' } reached Boolean() as true, and { type: 'attachClipboardFiles', files: null } threw inside .map. The spec table is cross-checked against the IncomingMessage union by a unit test, so a new message type that forgets its spec fails the build.
  • Dangerous-tier approvals use a native modal. For chmod 777, curl | sh and inline interpreter scripts, the "Allow" button used to be a webview card — which is just a postMessage the webview can send to itself if it gets injected. Those confirmations now go through showWarningMessage({ modal: true }), a path the webview cannot reach. Ordinary approvals stay in-panel (no window lock).
  • The settings panel got the same treatment, and it matters more there: save carries plaintext API keys, clearLocalData wipes local storage, and settings can redirect baseUrl. It now has its own spec table, the same entry validation and the same CSP directives. The two tables cannot be used interchangeably (the chat panel rejects save, the settings panel rejects approvalResponse), asserted in both directions.
  • CSP gained base-uri 'none'; form-action 'none' — neither falls back to default-src, so leaving them out left a hole for injected <base> tags and form submissions.
  • Run teardown only removes its own registration. runs.delete(conversationId) ran after several awaits; if the same conversation had already started a new turn, it deleted the new turn, making the running dot vanish and Stop stop working. It now compares identity. Approval and decision cards are settled per runId for the same reason — settling them per conversation closed cards the new turn was still waiting on.
  • Draft epoch. pendingAttachments / pendingContext belong to "the current conversation", but every source of them is async (file dialog, clipboard decode, re-reading from disk). Switching conversations mid-flight used to push A's attachments into B's draft, so they got sent to the model with B's message. Every conversation switch now bumps an epoch, and both attachment paths discard stale results with an explicit notice. An epoch (not a conversation-id compare) is required because A → B → A leaves the id unchanged.

Cross-window storage concurrency and process lifecycle (was 0.4.11)

Storage concurrency (⑦) and process lifecycle (⑭) — both are "data or processes disappear quietly".

  • Two VS Code windows are no longer two unrelated truths. Manifest writes now take a cross-process lock, re-read the latest file, merge by id (newer updatedAt wins) and write atomically. Deletions leave a 7-day tombstone (deleted.json) so another window's stale snapshot cannot resurrect them; restoring from the recycle bin revokes the tombstone. cleanup() now elects a single "cleanup master" (non-blocking lock) instead of letting two windows delete shared, content-addressed payloads/ from under each other.
  • Closing a window no longer leaves orphan servers. ToolExecutor.dispose() already killed background services and in-flight commands but was never called; deactivate() and the panel's onDidDispose now invoke it (plus a live-executor registry). On Windows the tree is killed with taskkill /T, because child.kill() leaves spawned npm/node children holding ports.
  • Two real regressions were caught by unit tests during the work: tombstones keyed by timestamp collided when several deletions happened in the same millisecond, and the resurrection allow-list was too broad, permanently exempting later peer deletions.

Sensitive-data egress (was 0.4.10)

Sensitive-data egress (review items ⑥ + ⑮), plus two gaps from the previous batch.

  • One detector, four channels. src/core/secretScan.ts is now the single host-side check (the webview keeps its own copy for warnings, and a guard compares both on the same corpus so they cannot drift).
    • To the model: read_file used to trust filenames only, so keys inside config.json / notes.md / backup.txt went straight out. Now a content hit asks first, showing only kinds and counts.
    • To the embedding service: messages containing credentials are skipped from the index (logged), while keyword search still covers them.
    • To audit logs: redaction is now driven by known secret values (raw, base64 and URL-encoded), plus whole PEM blocks and vendor prefixes.
  • Taint actually persists: agentRunner copies the scope per tool call, so the earlier untrustedIngested flag died after one call. It is now written back to the shared run scope.

Security boundaries (first review batch) (was 0.4.9)

Security boundaries, driven by external review (GPT + Claude). Principle: when a command cannot be statically understood, it is no longer allowed silently. Every fix below was verified against a real reproduction, not inferred from reading code.

  • SSRF (real, reproduced): a public URL that 302-redirects to 127.0.0.1 used to read local services. Now redirects are followed manually, each hop is re-validated (scheme, host literal and resolved IP), credentials are dropped across origins, and hops are capped. Host detection now covers IPv4-mapped IPv6 (::ffff:7f00:1), CGNAT 100.64/10 (cloud metadata 100.100.100.200), 198.18/15, all of fe80::/10 and fc00::/7 - without false-positives on fdroid.org / fc2.com.
  • Command tiers (real, reproduced): python -c "open('/etc/passwd')", node -e, bash -c, X=rm; $X -rf, curl … | sh, find -delete, git clean -fdx used to be standard and ran silently under review/autopilot. They are now severe (denied under the default preset, confirmed each time otherwise).
  • Path isolation (real, reproduced): absolute paths hidden inside command substitution ($(cat /etc/passwd)), interpreter payloads, or redirection targets (> /etc/passwd) are now validated too.
  • Workspace settings can no longer weaken security (P0): 30 of 37 settings had no scope, so a repository's .vscode/settings.json could set baseUrl to an attacker's host and receive the SecretStorage key. 26 security/credential settings are now scope: machine and listed in restrictedConfigurations.
  • Prompt injection: external content is wrapped in <untrusted_external_content>; project memory now states it is a record, not instructions (blocking "malicious page → model summary → system memory"); the system prompt defines four trust levels; (an earlier rule that silently turned commands back into confirmations after reading external content was removed at the user's request: it made Autopilot quietly stop being Autopilot. Pick a stricter preset if you want stricter behaviour.)
  • New: writing auto-executed files (.vscode/tasks.json, postinstall, .envrc, workflows, git hooks…) always requires confirmation; bridged VS Code tools can no longer bypass this extension's deny via delegateApproval.

Still open (tracked, not claimed as fixed): OS-level process sandboxing and pinning the connection to a validated IP (custom undici lookup). Cross-window locking, runId ownership, webview message schema validation and known-value audit redaction were opened here and closed in the sections below.

Command advice and shell compatibility (was 0.4.8)

When a command was blocked by path isolation, the "rewrite it as" advice was itself illegal - copying it would fail again.

  • The advice picked the wrong workspace: the command ran in Safevault_windows, but the suggested scratch path was under Personal Workstation OS/tmp (a different workspace, and the conversation's bound project). The root is now chosen by where the command actually runs, and the advice starts with mkdir -p because that directory usually does not exist yet.
  • Bash-only syntax was killed by /bin/sh: diff <(…) <(…) uses process substitution, which only bash has. Commands are now inspected first (process substitution, [[ ]], =~) and only those switch to /bin/bash; everything else keeps the default shell, and Windows is unchanged.

Verified

1,276 unit tests + 75 guard scripts green. Guard scripts added in this release: check-webview-boundary.mjs (32), check-concurrency-and-lifecycle.mjs (15), check-secret-egress.mjs (13), check-security-boundaries.mjs (27, one of them re-running the real public-redirect attack chain), check-command-advice.mjs (17).

What's new in 0.4.7

replace_in_file failed three times in a row on the same comment, then stopped with "3 consecutive tool failures".

  • The diagnostic was lying: the "file actually reads" lines were prefixed with 2 extra spaces, so 7 real spaces were shown as 9 - exactly what the model had already written. Copying it verbatim could never work.
  • The tool should not make the model count spaces: when only leading indentation differs and the window is unique, the edit is now applied using the file's real indentation, with newText shifted to match. Multiple similar windows are left alone and reported instead.
  • Intra-line whitespace differences are still treated as different (they change meaning); only line-leading whitespace is tolerated.

Verified: 1216 unit tests + 70 guard scripts green, plus a run of planReplacement against the real i18n.js from the report.

What's new in 0.4.6

Hotfix for a release-blocking bug. A new user on a fresh Windows machine failed at the very first thing:

Blocked the git operation: repository E:\AI Projects\maiker_windows also contains another workspace project (e:\AI Projects\maiker_windows)

Those are the same directory - only the drive letter's case differs. The guard compared paths as strings, so git pull / git fetch were rejected by the extension itself. Path identity now goes through samePath() (case-folded on Windows/macOS, not on Linux), and a repository root can never be treated as "foreign" regardless of spelling. A repo-wide sweep found 10 sites with the same defect: command cwd ownership, file policy project root, project-root binding validation, the project badge (the primary project could silently vanish, or one project be counted twice), archive dedupe, path-rewrite suggestions, workspace search, and a private copy of the containment check in pathHints.ts (case-sensitive on macOS, so "walk up to the nearest directory" could cross the workspace root). Path identity now has exactly one implementation, in core/pathIdentity.ts.

New test/check-path-identity.mjs: it statically forbids resolve(a) === resolve(b)-style comparisons and verifies identity on a real filesystem using differently-cased spellings - this class of bug could not be reproduced on the development machine at all.

Verified: 1210 unit tests + 69 guard scripts green.

What's new in 0.4.5

All of it on the semantic retrieval path: whether the settings page responds, whether the check says the right thing, and whether a passing check actually takes effect.

  • "Check direct support" did nothing when clicked - the handler called a function that does not exist. It now shows "checking..." and disables the button.
  • Text buttons were squeezed into squares, stacking Chinese one character per line ("Test image", "Check direct support"): they sat in a grid meant for square + / - icon buttons.
  • Literal ** asterisks leaked into the instructions: that block is plain text and does not render markdown.
  • New "Embedding API key" field, stored per profile - keep the chat key (DeepSeek) and the embedding key (holysheep) separate; a saved key shows "Saved (leave empty to keep)". A leftover field that would have written the plaintext key into settings.json was removed too.
  • The verdict no longer blames the wrong model: it used to try every vendor's model name and report only the last candidate (so a user who typed embedding-3 saw Alibaba's "model does not exist"). Candidates are now scoped to the provider, the verdict names the model you typed, and every attempt is listed with the provider's own message plus HTTP/business code.
  • encoding_format is no longer sent: Zhipu's schema has only model / input / dimensions, and the OpenAI default is already float.
  • Error codes are explained: 1211 wrong model name, 1212 a chat model was selected, 1222 this address has no embeddings endpoint, 1113 account in arrears or out of balance, 1315 a plan key used against pay-as-you-go.
  • 429 does not always mean rate limiting: Zhipu returns 1113 with HTTP 429, and the old copy told someone who had just topped up to "retry later". Arrears and real rate limits are now separated, and arrears no longer retries other model names.
  • New "account check": one cheapest-possible chat request with the same key. If chat is also refused, the problem is the account (verify which account this key belongs to - balances are not shared). If chat succeeds, only the embedding product line is refused (that model needs its own resource pack). That is exactly how this was diagnosed: a key from the right account passed.
  • A passing check is not the same as being in effect: the vector index reads the saved settings and key while the check only validates what you typed. A successful check now reveals a "Save and enable" button; close settings without pressing it and the index still uses the old key (and fails silently).

Verified: 1201 unit tests + 68 guard scripts green (12 of those drive real Chromium: measuring button geometry, actually clicking the check, and walking "check passes -> button appears -> click it -> key lands in SecretStorage").

What's new in 0.4.4

Three things: the agent stops forgetting the project, images and commands stop failing for no reason, and retrieval goes from keywords to vectors.

  • The "suddenly forgets the project" root cause is fixed. The context budget was measured in raw JSON bytes, so one message with two screenshots (2747 KB) could eat the whole 2 MB and push the sentence you had just written out of the request — the panel then answered "I did not receive a specific request". The budget now counts only what the model actually receives, the newest user message is always kept, and a final guard re-adds the current turn: a system-only request can no longer happen.
  • Memory = task tree + constraints + checklist. Every turn injects <project_memory>: finished tasks carry a one-line outcome, the hard constraints the user gave ("don't touch the capsule style") and which checklist items actually completed. Items are attributed by each task's own time window, so one list is never copied onto every task. Older turns are no longer replayed word by word, but the full record stays on disk and is searched on demand (archived tool output included).
  • Retrieval is automatic, and can be semantic. Each turn the host searches the older record with keywords from your message (a failing tool also triggers a lookup with its error text); keyword matching is fuzzy; an optional vector index covers synonyms such as "floating bar" vs "capsule". When a term maps to several tasks it proceeds with the closest match and states the assumption, and only asks when they are genuinely tied.
  • Images and records are never lost. A failing image re-resolves its address first (usually the full image comes back) and only then falls back to the thumbnail; pasted images are stored as files (2747 KB → tens of KB); tool output moves to payloads/ and stays restorable, while the message body always stays.
  • Failures say what they are. Half an emoji no longer kills the request; "stalled" and "disconnected" are reported separately; DeepSeek connects directly by default (without touching git push/pull); Copilot edit tools that can never work are no longer offered; a command reporting "No such file or directory" now comes with the real directory structure.
  • Semantic search setup is documented inside the settings page (Zhipu / Minimax / holysheep) with a "Check direct support" button. Note DeepSeek has no embeddings API, and a holysheep key is that account's own key, not your DeepSeek key.
  • This release absorbs the local-only 0.4.5–0.4.10 iterations (never published). Verified with 1192 unit tests + 67 guard scripts.

Earlier: 0.4.3 (internal build)

0.4.3 was an internal build that was never published; its content (the context-budget root cause behind "suddenly forgets the project", and the first version of the task-tree memory) is included in 0.4.4 and described there. Full history: CHANGELOG.

Interface language

PlaitCode speaks Chinese and English. Open Settings → General → Interface language and pick Auto (follow the VS Code display language), Chinese or English. The chat panel, settings page, notifications and error messages switch immediately — no window reload needed.

Command palette titles and the configuration descriptions in the VS Code Settings UI follow the editor's own display language through the standard VS Code localization (NLS) mechanism.

Coding agent

  • Agent — reads and searches the project, checks diagnostics, creates/edits/moves/deletes files, runs commands, and feeds tool results back to the model for multi-step work.
  • Every reply has a fixed shape: 我的理解 (what I understood) → result → what you need to do. The understanding block opens every answer with one to three sentences restating your request (accent line on the left, so it reads differently from the result). The result then answers your input directly instead of listing tool chatter. Each follow-up item carries its own details right underneath — the exact path, the command block (labelled with location and shell, with a copy button) and the expected outcome — so you never scroll back to find a path. All tool steps of the turn collapse into a single block at the end: Process · N commands · M files, and expanding it reveals the per-step cards. Prompt: src/agent/replyShapePrompt.ts; rendering: media/chat.js; regression guard: test/check-reply-shape.mjs.
  • Plan — read-only tools only: analyse code and produce a plan without touching the workspace.
  • Chat — no workspace tools at all; only the conversation and the context you explicitly attach.
  • The active mode comes from the composer dropdown and, for new conversations, from plaitcode.defaultMode: switching in the dropdown is written to the current conversation immediately and stays in force for every later request. Each request also states the mode explicitly in the system prompt (and marks it authoritative for that turn), so continuing a conversation after a switch never rides on the previous mode's assumptions. The tool list, the permission gate and the prompt all read the same resolved mode.
  • Understands single-root and multi-root VS Code workspaces natively: list workspace roots, browse directories, read files, and open them in the editor through open_file — no detouring through a terminal, the code CLI or another extension. Tools bridged from other VS Code extensions obey the same path isolation as the built-in ones, and their parameter descriptions state that file arguments must be absolute paths inside the workspace.
  • In a trusted workspace, and when the active permission preset allows it, the agent runs commands inside the workspace on its own. Commands are graded in three tiers: read-only (ls, git status, grep…), regular (install, build, commit…) and dangerous (privilege escalation, destructive deletion, disk wiping, pushes to a remote, piping remote scripts into a shell…). Ask every time confirms everything and denies dangerous commands outright; Ask on risky actions and Autopilot run read-only and regular commands automatically and ask for dangerous ones; Full access even runs dangerous commands but still confirms before reading sensitive files. Untrusted workspaces and path isolation outside the workspace always apply. sed/grep pattern or script arguments (such as sed -n '/a/,/^b/p') are treated as patterns and not mistaken for escaping paths, while real file arguments are still validated one by one — including direct filesystem-root targets like rm -rf /, which are rejected. Windows command switches (such as for /R or findstr /S) are recognised as switches on Windows and are not mistaken for absolute paths. Pull-type commands (git pull / fetch / clone) stay in the regular tier, and asking to "pull the latest", "update the repo to the newest" or "sync the remote" counts as an explicit git request, so it is no longer stopped by the "git writes need an explicit user request" gate; git push remains the most dangerous tier and is denied outright under the default Ask every time preset — switch to Autopilot / Full access to push.
  • While a command runs, the step card keeps telling you it is still alive: it refreshes running 12.3s every second instead of only showing a duration after the fact. If a command produces no output for 30 seconds, the card switches to the warning colour, states "No output for Xs — may be waiting for terminal input", and raises a notification that also names the timeout cap. That number refreshes every 10 seconds rather than freezing at 30 — a frozen figure next to a ticking running counter looks like the UI hung again — while the notification itself fires once, so it stays a signal instead of noise. Its display time scales with the text: the Chinese stall warning now stays about 9 seconds (it used to be a flat 4.2 seconds, which is not enough to read sixty-odd characters), short toasts keep their 4 seconds, and clicking a notification dismisses it immediately. This matters because a hung command and a busy one are otherwise indistinguishable. Timeouts terminate the whole process group: killing only the shell leaves grandchildren such as cargo or qlmanage alive, still holding the output pipe open and hanging the call forever (this really happened — the card sat on "preparing to run command" for half an hour while the test process had used 0.01 s of CPU). Settling has three fallbacks — a normal close, a grace period after exit, and a hard deadline after SIGKILL — so a call always returns. PlaitCode cannot hand the terminal over to you: commands that need a password (sudo, ssh) read EOF and fail fast, so use non-interactive forms. The per-command limit is the smaller of the configured value and the tool request — 120 seconds by default (5–900 s in settings) — so asking for a larger value does not extend it.
  • Every execution step is collapsed by default and shows a result summary; expanding it reveals tool input, output, approval state, elapsed time and touched files. The expand/collapse state belongs to you: re-rendering during streaming no longer collapses a step you opened. Steps are not rebuilt while a reply streams: a step whose anchor lies after the text written so far is only temporarily pinned to the end, and that temporary position changes with every character — counting it as a structural change used to re-render the whole message each frame, which killed the hover highlight (CSS :hover only lasts while an element is the designated target, so replacing the node drops it) and swallowed clicks (a click that lands between press and release on a node that got swapped is dispatched to the nearest common ancestor — or, as measured, not dispatched at all). The grouping is therefore flattened to pending in the signature, so only a real change (tools appearing/changing, or the text finally reaching that anchor) triggers a re-layout (regression tests: src/test/toolGroupStability.test.ts). Clicking a collapsed heading is also caught on pointerup: if the summary you pressed is no longer in the document when you release, the same step is located again by its stable data-detail-key and toggled — equivalent to the activation behaviour the HTML spec defines for summary. Releasing outside the pressed rectangle does nothing, and a summary still in place is left to the browser, so a normal click never toggles twice. A collapsed step builds no body at all — the input/output markup is created the first time you expand it (a still-running step is created immediately, since its stall hint lives there and has to stay visible, and a step you had opened stays open across a re-layout because the restored open fires the same listener). Collapsed tool bodies used to be rendered and then merely hidden: measured over 600 messages of six steps each, that cost 136 DOM nodes per message versus 64 now (−53%). That does not translate into a proportional memory win, though, and the numbers are worth knowing: the same 600 messages took the renderer from +241.4 MB to +231.6 MB (−4%), because the real cost is that each message gets laid out and painted at all (600 plain-text messages still cost +41 MB, and the curve is linear: 50 → +26.5 MB, 200 → +81.1 MB, 400 → +157.3 MB). Node count was never the bottleneck; not rendering off-screen messages is (test/check-tool-detail-lazy.mjs).
  • Add multiple files from the composer, or right-click a file in Explorer and choose PlaitCode: Add files to chat. File contents never reach the webview; they are attached to the API request on demand from the extension host.
  • Multiple OpenAI-compatible API profiles, each with its own endpoint, API key, model list and request headers, switchable from the control row under the conversation title.
  • Model selection does not depend on Copilot or any other extension. PlaitCode calls the profile's /models endpoint, filters models the API marks as retired, expired or unavailable, and remembers models you excluded. Before the first refresh, the official DeepSeek endpoint falls back to deepseek-flash and deepseek-v4-pro.
  • Reasoning depth has five options: Default (model) / none / low / high / max. New conversations start at Default (model), which sends no reasoning_effort or thinking at all and lets each model use its own official default. none is always offered on any reasoning-capable model: DeepSeek's own effort.supported_levels deliberately leaves it out because it means thinking off, not a depth, so validating strictly against the declared list silently turned a disabled request back into an enabled one. Picking it sends thinking: {type:'disabled'} together with reasoning_effort: 'none'. The other depths follow what the model declares (DeepSeek lists low/high/max); medium is only a server-side alias for high, so advertising it would show a depth the model does not really have. Declared levels are deduplicated against Default/none, and a narrowed declaration still keeps none so thinking can always be switched off. Other OpenAI-compatible endpoints have no max level and receive their highest level, high. The selector is only enabled when the current model advertises adjustable effort; unsupported, fixed or unknown models are never dressed up as adjustable, and compatible endpoints that reject the parameter get a retry with it removed.
  • Max steps has four presets: 24 / 68 / 120 / unlimited (new conversations always start at 24). Unlimited means no round cap, and the loop still stops on its other guards: at most 12 calls executed per round, the same tool call three times in a row, several rounds without progress, and the stop button (the per-run tool-call total itself has no cap). A stored 0 from an older conversation or setting is the explicit "unlimited" value; negative or invalid values still fall back to the default 24.

Rounds and tool calls are two independent quantities, so do not read one as the other: max steps caps how many times the model may go back and forth, while the tool-call count measures how many tool invocations one run makes. The per-run tool-call total has no cap — the same for all four presets (24 / 68 / 120 / unlimited) — so a long task is never cut short by an "out of tool calls" notice. Unlimited still is not a free-for-all: a single round executes at most 12 calls (extras are skipped and reported back to the model, then the loop continues), three identical calls in a row count as a loop, three fully failing rounds stop the run, the finite presets are still bounded by their step budget, and the stop button always wins.

If what you actually want to silence is a confirmation box on every command, that is unrelated to the call count: the confirmation of bridged command tools (run_in_terminal and friends) is decided by VS Code itself, not by PlaitCode's permission preset. To set it up once, run PlaitCode: Sync VS Code approval preset from the Command Palette (it writes the chat.tools.* user settings, lists every change for confirmation first, and can be reverted at any time). Its four levels run from "Off (ask everything)" to "Auto-approve everything (dangerous)", the latter writing VS Code's own master switch chat.tools.global.autoApprove. Note that in VS Code 1.144 chat.tools.edits.autoApprove is a glob map, not a boolean toggle, so PlaitCode no longer writes it — its default already approves file edits and only excludes sensitive paths such as .git and package.json.

  • Each finished assistant reply shows its own token usage normalised to millions (M tokens); the conversation list shows the running total for the whole conversation.
  • In that conversation list, a running conversation shows Running in the accent colour (blue) while the timestamp and token count stay muted, so the one that is actually working stands out at a glance. Conversations waiting for approval keep the plain colour.
  • The chat header puts the title on the first row, the status text ("Ready · N tools" / running) together with the project name on the row beneath it, and work mode, API profile, model, refresh, plus skills/archive/export/settings on a separate row that wraps instead of squeezing the title. The dropdowns and the skills button keep only what carries information — text plus a chevron with a fixed gap for the three selects, the star icon alone for skills (its count moved into the tooltip) — so the header has room for the title. Each select is sized to its content and none of them grows: mode 60px, profile 82px, model 150px, so the model box never eats the whole row and turns into an oversized empty field. The row itself is justified (justify-content: space-between): the controls used to sit inside three control-group wrappers, so leftover width was only distributed between groups while each group kept its fixed 6px — which read as tight inside a group and loose between groups. The wrappers are gone from the template, so all eight controls are direct children of .toolbar-controls and the leftover width is split evenly between every adjacent pair: every neighbouring pair sits the same distance apart, with the first and last control flush to the row edges (gap stays as the minimum so they never touch when the row is nearly full).
  • The conversation title is editable: the pencil icon at the right turns the title into an underlined inline field, with a check to save and a cross to discard (Enter/Esc do the same). Custom titles are capped at 48 characters and are never overwritten by the automatic title taken from the first message. Renaming does not bump updatedAt, so the history order does not jump.
  • The project name sits in the status row under the title, immediately to the right of the status text (the row is left-aligned with a fixed 8px gap, so it never covers the status), so it never eats the title's width: the workspace folder this conversation is bound to, in orange. The label is plain text — no pill, no border, no padding. When no folder can be determined it turns red and reads No project yet — that state is real, because relative paths then fall back to the first root and git writes are refused, so guessing a folder name would be misleading. The label flips to orange as soon as the conversation touches a file and binds its project root. Additional project labels, if any, flow left to right after the status text; a long project name is truncated first (capped at half the row) while the status text keeps at least 45% of the width.
  • That label lists every project the conversation touched, not just the one it bound to first: a conversation often spans several projects (build the feature in A, fix B's integration along the way), and showing only the first one hides both "it changed something elsewhere" and "you accidentally edited another project". Each successful write records its project root once, in first-touched order; refused or failed writes do not count as a change, and read-only commands (git status) do not either. Names are joined with · and folded into +N when the row runs out — hover for the complete list. Conversations from before this change have no such record, but theirs is recovered from the folder-name prefix of the paths in their tool history, so they show multiple projects too.
  • The composer is a single rounded box: the text area on top, and one bottom row holding permission preset, max steps, reasoning level plus attach, voice and send/stop. That row never wraps; as it narrows, the text prefixes disappear in the order reasoning → max steps → permission preset, leaving only the selected values. A new conversation starts at Ask every time / 24 steps / reasoning high. Switching presets shows that preset's risk summary and takes effect on the next send.
  • Everything stacked above the composer (task tree, task list, archive capsules, decision cards, tool-approval cards) is capped at 56vh / 560px (58vh in short windows) and scrolls inside its own panel area, while the composer stays pinned and always visible. An expanded decision card with three options is 474px tall; before this cap it had no limit inside the footer, so at 430×790 the message area collapsed to 0px and the composer sat at top=852, entirely outside the viewport. A newly arrived card scrolls itself into view (without hijacking your scroll when it is already visible), and the panel area keeps its scrollbar visible so nothing looks cut off.
  • The panel opens instantly: activation only hydrates (reads the two local skill directories plus the paths saved by the previous scan — 17ms measured, 4ms with a warm cache) and never traverses the workspace; the real scan runs in the background and pushes newly added or removed skills into the panel when it finishes. None of the three interactive entry points (open panel, new chat, send) waits for it. Measured first paint 335ms on a real 60.9MB / 1473-message archive, where a single scan used to cost 6754ms (and much more in a fresh VS Code window).
  • Your message appears in the list on the same frame you hit send
  • Your message appears in the list on the same frame you hit send — it does not wait for the extension to persist it, scan skills or assemble context (measured ~1ms synchronously; the old order put all of that ahead of the paint and reached 2-3s in a 200-message conversation). The extension then replaces that optimistic bubble with the real message, appending nodes instead of rebuilding the whole list (14ms measured at 200 messages). If the send is rejected (data-flow consent missing, no API key, archived conversation), the bubble is removed and your text goes back into the composer; switching conversations or a state refresh mid-flight never leaves behind a message that does not exist on disk.
  • The composer stays editable while the agent runs. Every new message pauses what is running: the answer being generated is cut immediately, and a batch of commands already issued stops as soon as the running one finishes (the rest are marked paused). The partial text stays in the conversation. The agent then re-reads the whole picture (goal, task list, completed steps, what it was doing when interrupted, the new message) and calls update_todos with the adjusted full list before continuing — keeping completed items, dropping stale steps that conflict with the new request, adding new ones. A message the classifier judged to be a separate deliverable is still handed to the agent at that pause point: it either folds the work into the current list or says in one sentence that it comes after the current task, and the message stays queued so it still runs later. The judgement is not based on the branch title alone — it gets live context (task-list progress, the item being worked on, the last few steps), so how many messages separate it from the running one does not affect whether it gets read. Cost is bounded: each message is re-judged at most once per branch. The pause never kills the command that is already running, but it stops the moment that command ends.
  • Every question you insert while the agent is running immediately gets its own queued reply slot, and the answer ends up under that question instead of being prepended to the previous reply.
  • Streaming redraws only what is still growing. Each delta re-renders just the block that is still being written (a plain-text tail is appended in place, so existing nodes, hover state and transitions are untouched); blocks above it keep their exact DOM nodes, so already-emitted text cannot flicker. The tail is also completed before it is rendered — an unfinished **bold, `code or [text](https://github.com/Gsaecy/PlaitCode/blob/HEAD/htt is closed for that frame, the same trick Streamdown/remend use, so half-written markup appears in its final shape instead of showing literal asterisks and then jumping into bold. The message area opts out of browser scroll anchoring (overflow-anchor: none) because PlaitCode drives scrollTop itself each frame, and the two compensations otherwise fight and read as a small jitter (MDN's scroll-anchoring guide: only opt out when you drive scrolling yourself). Both decisions live in pure, unit-tested modules: media/inline-append.js (canAppendPlainText — any inline marker, extension-like .xx, or a path split across two frames falls back to re-rendering) and media/stream-repair.js (repairStreamingMarkdown / needsRepair — star runs paired by width instead of counted modulo two, a single ~ treated as a literal 20~25, nothing completed inside fences). File chips keep one fixed label for the whole stream: the verification result is cached per project root, so a rebuilt chip is never briefly short before growing into the real path.
  • You can scroll freely through history while the agent runs; streaming only auto-follows while you are at the bottom. During execution the send button becomes a red highlighted stop button (danger background, breathing halo, solid square icon) so it is obvious the task is running and how to stop it; the animation is skipped when the system reduced-motion preference is on. Pressing stop really stops: the whole process group is sent SIGKILL (plus one follow-up after 250 ms) instead of polite SIGTERM and a grace period, and the run is aborted right after the kill, so a command that ignores SIGTERM still disappears in well under a second. Children are tracked per conversation, so stopping one thread never kills another conversation's commands.
  • Paste images, screenshots and files straight into the composer; pasted images show a local thumbnail first. Images are sent as OpenAI-compatible multimodal content. When the task cache expires, attachment bodies, image Base64 and thumbnails are dropped while names, types and sizes remain. If the configured model only accepts text content (some text-only models reject image_url with a messages.content.type 400), PlaitCode strips the images, says so in the message it sends, and remembers that per profile + model — so the conversation keeps working instead of failing on every later message, since a single old image in history would otherwise poison every request. Switching to a vision model restores image sending immediately, with no restart.
  • Attachments are clickable and open in the editor, in the composer and in sent messages alike, so a wrong paste can be checked before sending. Files picked from disk open at their original path — nothing is copied, moved or rewritten. Pasted text opens as an untitled document and never touches disk. Pasted images get a content-addressed copy inside the extension's own storage, so no files appear in your workspace and repeated clicks reuse the same cached copy.
  • Files mentioned in a reply are clickable and can be located in your system file manager. A path the model writes (src/core/ids.ts, media/chat.js:745) renders as a small chip instead of dead monospace text: hovering lifts it slightly and the tooltip carries the full absolute path; click opens it in the editor (jumping to the line when one is given), right-click opens a four-item menu: reveal in Finder / Explorer (with the file selected), reveal in the VS Code Explorer view (expands the project tree and selects the file there, leaving the editor untouched), open in the editor, and copy full path. Those two "reveal" entries are deliberately separate features - one takes you out of VS Code to the system file manager, the other keeps you in the editor - so they are two distinct commands (revealFileInOS / revealInExplorer) and two distinct messages; the VS Code one also checks first whether the file is inside the workspace, because revealInExplorer is silently a no-op for anything outside it. The second entry is worded "Reveal in Explorer View" rather than "Reveal in Explorer" because on Windows the system file manager is also called Explorer and two identically named entries would be impossible to tell apart. A path written in backticks (reference form) shows the relative path plus line number; a bare path with no reference formatting is still recognised but shows the complete absolute path, so you can find the file outside VS Code. Detection uses an extension allowlist, so v0.2.4, e.g., example.com, URLs and --force never grow a menu; paths containing spaces are only recognised inside backticks, where the boundary is unambiguous; and a path glued to Chinese text is still picked out exactly. Naming follows the platform: Finder on macOS, Explorer on Windows, file manager elsewhere. The whole path is read-only — showing and opening never move, rename or rewrite the referenced file. Every reference is verified before it is shown: after rendering, each one is sent back to the extension once, which checks the real file system - an absolute path must exist; a relative path with directories is resolved only against the project root and the workspace roots and never falls back to a same-named file elsewhere; a bare filename is first joined to the roots (package.json and friends live there) and only then looked up by name across the tree, and only a single match counts (pointing at the wrong file is worse than showing no reference at all); when nothing can be determined, the chip degrades back to plain text with the original wording untouched. When the verified file is a different one (extension.js → out/extension.js), the label, tooltip and both click targets are switched over together, so a chip never says A while opening B.
  • Voice input is supported. PlaitCode only receives the transcribed text and never writes audio into the conversation cache; the text is still only sent to the API after you press send.
  • Replies are rendered as Markdown rather than one wall of text: headings (#–######), nested ordered/unordered lists, tables (with alignment and horizontal scrolling), quotes and rules, plus inline bold, inline code, strikethrough and [text](https://github.com/Gsaecy/PlaitCode/blob/HEAD/link). Commands you have to run yourself appear as a dedicated block whose header states where it runs (loc=local local terminal, loc=server remote host shown in a warning colour, or loc="custom label") and with which tool (bash, zsh, cmd, powershell…), with one-click copy through the VS Code clipboard confirmation that copies the command only and never the labels; commands written inside a list item are rendered as a block too instead of leaking as literal backticks; tool input, results and the actual command can be copied too, and message text supports select-then-⌘/Ctrl+C. Step summaries read like "Process · 5 steps, 2 files changed" so non-programmers can follow along. Every "here is what I am about to do" paragraph is followed by the exact steps it triggered — what ran and how it ended — interleaved in the order things happened, so nothing has to be cross-referenced; a single-step group omits the summary heading, and older messages keep the previous "steps, then text" layout. Reminders you must not skim past are rendered as graded callouts: writing > [!DANGER] short title turns the title red and paints the icon in a bright warning yellow, > [!IMPORTANT] short title keeps the normal title colour and only turns the icon orange, and anything else stays a plain quote. The level comes from that explicit marker rather than from guessing the wording, and [!DANGER] is reserved for exactly three kinds of unrecoverable harm: destroying the project (source, uncommitted work, already-shared history), destroying the disk or the system (formatting, raw device writes, wiping a home directory, breaking the shell environment) and leaking credentials or personal data (passwords, private keys, API keys, tokens, certificates, .env; government ID numbers, bank card numbers, phone numbers). One question decides it: after this happens, can you still get your work and your machine back untouched? If yes it is not a danger callout — deleting temporary files, reversible edits and ordinary code changes stay plain text no matter how large they look. And when you paste a plaintext credential such as an API key or a private key into the chat, the UI does not wait for the model to notice: it puts a danger callout right under that message, naming only the kind of credential and its character count, never echoing the secret itself. Government ID numbers, bank card numbers and phone numbers trigger it too, because unlike a key they cannot be revoked once sent — the callout suggests sending only a masked fragment. The two groups get separate advice (rotate a credential; report a lost card and watch for fraud). Detection uses structural checks (mod 11 for IDs, Luhn for cards, carrier prefixes for phones), so placeholders like sk-xxxx or your_api_key_here, commit hashes, version numbers, timestamps and ordinary order numbers do not trigger it. A closing 🔔 需要你做的 checklist is always a plain numbered list (1. **action**) and never shows [ ] checkbox markers: the rule lives in PlaitCode's own system prompt (src/agent/followUpPrompt.ts) and the renderer strips the marker again (media/follow-up-format.js), so the layout holds whether or not the model complies. Only ordered lists are affected — a genuine - [ ] task list stays intact, and the stored message text is never rewritten.
  • The composer supports ⌘/Ctrl+V for text, images, screenshots and files. When the clipboard carries both text and attachments, both are kept; if the webview's native paste fails, PlaitCode falls back to the VS Code clipboard.
  • Beyond the built-in workspace tools, PlaitCode discovers and calls every language-model tool exposed by other VS Code extensions (no longer capped at 100). Tools that need authorisation show VS Code's own confirmation only; tools that do not are called directly and PlaitCode adds no extra "Allow the agent…" prompt. Extensions that declare language-model tools but are not running are activated when you open the PlaitCode panel or send a message (no longer unconditionally at VS Code startup), and a tool call that hits a temporarily missing tool triggers one more activation and retry. Web pages, text, Markdown and diffs preview inside the editor.
  • Continue any conversation with Continue, or run PlaitCode: Continue current task history in a new chat. The new conversation keeps a local read-only handover digest of the source conversation and can also search the upstream chain on demand, so previously recorded pitfalls are not repeated. The old conversation is never copied or modified. Keeping the digest is free; whatever is actually sent counts toward input tokens.

Task list

When the work needs several steps, the agent writes a task list rather than leaving you to infer progress from the prose. It sits between the task tree and the composer, numbered in execution order: the step on the left, its state on the right.

State Indicator
Waiting to run green hollow circle
In progress green bouncing ellipsis
Completed solid green circle with a white check

All three marks are inline SVG icons, not font characters: the shape and weight are identical on macOS and Windows, the colour follows the theme, and nothing depends on whether the system font happens to contain the glyph or what its metrics are. The disclosure arrows work the same way (one masked chevron rotated 90° instead of a ▸ / ▾ character). A small set of emoji in agent output (🔔 📌 💡 🚀 🔍 ⚠ ✅ ❌ 📝) is replaced with the same icon set, because system emoji are coloured and glossy and cannot be flattened with CSS; the swap happens on rendered text nodes, skips <pre> / <code>, and leaves unlisted emoji alone.

Click the title to collapse or expand the list, the same way as the task tree. A new list opens the panel automatically — the collapsed state is only remembered within one list, so a list that was collapsed earlier never makes a new task look like it never started. The agent keeps exactly one step in progress, updates the list after each step, and leaves the finished list in place as a record of what happened. The list is stored with the conversation, so it survives reloading the window; a single-step request never creates one. It is a tool (update_todos) that needs no permission, because it changes no files and runs no commands.

Two things the task list never contains

A push and a version bump are never task-list items. Both are asked about separately once the work is finished and verified, and happen only after you say yes.

This is not tidiness for its own sake. The moment a list reads 6. Commit and push, clicking Continue shows you those steps and approves the work they describe — so a push you never asked for gets authorised by the list itself. And that item is usually not the agent smuggling something in; it is the plausible expansion "while I am committing, I may as well push", which is exactly the kind of line nobody re-reads.

Two layers are needed, because either one alone leaks: a prompt rule that keeps these steps out when the work is broken down, and a filter before the list is stored that removes them if the model writes them anyway — plus a note in the tool result telling it to ask you afterwards.

The filter is deliberately narrow and only matches real repository actions: git push, "push to remote / origin / branch", "push the code to origin", "bump the version to 0.2.4", npm version patch, "bump to 0.2.4". "Implement message push", "a toggle for push notifications" and "send a push notification to the device" are ordinary feature work, and "package as version 0.2.3" or "fix the version label" are a build step and a copy change — none of those are removed. If every item in a list is one of the excluded kinds, the list stays as it was rather than being emptied.

After an interruption: continue or cancel

When a run is cut short (process killed, stop pressed) or the model finishes without ticking the last boxes, two buttons appear at the far right of the list header: Continue and Cancel task.

  • Continue picks the work up from where it stopped instead of redoing finished steps. Context is rebuilt from the archive, so the model sees the list it wrote and every tool result up to the interruption. The button only appears while unticked items remain. It clears the interrupted flag before starting the run, then re-reads the archive afterwards: if the run never actually started (a denied approval, a blocked send, an error before dispatch), the flag is put back so the list cannot get stuck half-done with no way to resume.
  • Cancel task clears the list without archiving it and without leaving a capsule — it means "stop keeping this". If the run is still going, it is stopped first, so the end-of-run bookkeeping cannot write the cleared list back.

The header is split into fixed-width sections (title / state / actions), each left-aligned inside its own section, so a longer or shorter state text can no longer push the title around. The task-tree header has only the title and the node count. To keep the state section at a fixed width, the English state text was also shortened from interrupted, can be resumed to interrupted — the buttons already say it.

Archived capsules

Once every step is completed, the list is archived immediately — not when the run ends: the moment the last item is ticked, it leaves the composer area, the task-list disclosure disappears, and a solid-colour rounded rectangle takes its place above the input box, left-aligned. That removes the "finished but still taking up space" case: the model usually keeps writing its summary after the last tick, and if the process is killed or the window closed in between, the end-of-run bookkeeping never runs and a finished 6/6 list would sit there forever (reading a conversation also archives such leftovers).

  • A capsule holds no icon and no text, and hovering it shows nothing — the colour and the left-to-right order are the whole message. Screen readers still get "Archived task list, N/M done".
  • The border shows the state: the archive you have open gets a red border, and the capsule under the pointer gets a light red border so you can tell which one you are about to click (hovering never changes the capsule's own solid colour). The border is painted inside the capsule, so nothing shifts or resizes when it appears.
  • Click a capsule to expand that snapshot (title reads "Archived task list", the summary carries the archive time, the border turns dashed); click again to collapse.
  • Only one panel is expanded at a time: opening the snapshot closes and locks the task tree and the list that is still running (their titles dim, and clicking them says to collapse the archive first), so you are only ever looking at one list. Collapsing the snapshot — via its own title bar, or by clicking the same capsule again — unlocks them and restores whatever you had open before. If the right side of the panel is ever clipped or cut off, run PlaitCode: Copy layout report from the Command Palette (it includes a capsuleBar section): the panel measures its own webview viewport width, document scrollWidth, and the rects plus horizontal overflow of the sidebar, chat pane, message list and composer, then copies those numbers together with a list of out-of-bounds elements — enough to tell our CSS apart from a webview whose width is out of sync with the visible area. The chat pane also has a hard horizontal boundary (.app-shell uses overflow-x: clip), so no content can widen the document, spin up a horizontal scrollbar and push the right side out of the window — but that boundary only works together with a pinned column width: .chat-pane and .message-area declare grid-template-columns: minmax(0, 1fr), because an implicit auto column gets sized to the widest child's max-content (measured: in an 870px viewport with 40 archive capsules that column grew to 1387px and 514px on the right became permanently unreachable — the same root cause for both "dragging the capsule row to the end still leaves the last capsule clipped" and "the conversation is cut off") — on macOS overlay scrollbars stay hidden until you scroll, which makes that look like "the right side is cut off and there is no scrollbar". The panel area also has a height ceiling (28vh, and never more than 260px — far smaller than the earlier 44vh/360px) and scrolls internally (the scrollbar is always visible, so both the wheel and dragging work), so it can neither push the composer out of the window nor squeeze the conversation above it out of sight (very short windows give it one more step down). While a snapshot is open the other two panels collapse to their title bars, and the pane gets a taller ceiling so more rows fit at once.
  • A conversation can hold several archives; each new one appears to the right of the previous one. Colours are one continuous ramp from light blue #7cbef0 to deep blue #1e4fd8, sampled evenly by position, so the step between any two neighbours is the same size — it reads as a gradient rather than a few jump-cuts, getting deeper towards the right.
  • Capsules never wrap and keep a fixed 3:1 width-to-height ratio, 10.67px tall (32px wide). When the row is too narrow it scrolls horizontally with no scrollbar at all (a 6px track is nearly half the capsule's own height — it both obscured the row and pulled the eye): scroll it with the mouse wheel over the row, or hold the mouse button and drag (the cursor is grab, turning into grabbing while dragging; touch screens use the platform's native momentum scrolling). Once the row is scrolled to an end, the wheel goes back to scrolling the page vertically. Capsule size stays constant. A newly added archive scrolls itself into view once, while re-renders (expanding or collapsing a snapshot) leave your scroll position alone. The corner radius is about 3px, and each capsule remains a rounded rectangle, never a pill.
  • Archives are not capped: the capsule rail scrolls horizontally, so however many lists a conversation finishes, every one of them stays (the old 12-capsule limit silently dropped the earliest archives in a long-running conversation). Each archive itself is bounded at 40 items, so storage grows with the number of task lists you actually completed. Lists that ended with unfinished items are not archived — see "Unfinished lists" below.
  • Archives are persisted with the conversation (todoArchives in the manifest), so they survive a reload; malformed entries on disk are dropped at load time without affecting the conversation.

Unfinished lists (interrupted / not finished)

When a run ends with items still open, the list does not become a capsule: it stays in the panel and the in_progress item is downgraded to waiting (hollow green circle) so the bouncing animation stops — nothing is advancing it, so it must not pretend to be running. The note in the disclosure header depends on how the run ended:

  • interrupted, can be resumed — you pressed stop, the request failed, or the window/process went away. The work was cut off mid-flight.
  • not finished, can be resumed — the agent loop finished normally but the model forgot to tick the last item. That is not an interruption, so it is labelled in a neutral colour instead of the warning amber that would make it look cut off. The engine deliberately does not tick it for the model: the list is the model's own statement of what is done, and auto-ticking would be fabricating progress. Prevention lives in the system prompt instead — before ending a turn the model must re-read the list and, for any item whose work is finished (including the very last one), call update_todos once more to mark it completed.

Either way the follow-up is the same:

  • Carry on: ask the agent to continue. It reuses the same list, sets the current item back to in_progress, and once everything is completed the list is archived as usual. This resume instruction binds to that list exactly once: the panel scopes the turn to the list's unticked items instead of treating "continue the task list" as the task itself, so an unrelated request made meanwhile is queued (shown as waiting in the task tree) rather than merged into the running turn. When every item is already ticked, or there is no list at all, it does not apply. Continue approves that you keep doing what you already asked for — not every line of the list. The list is the agent's plan, not a record of what you approved; if it added something you never asked for (a push, a version bump), that step needs its own yes.
  • Start something else: just ask for the new task. A genuinely new list replaces the old one, but replacing a list that still has progress is refused: if the submitted list drops items the existing list already marks completed, update_todos returns an error, nothing is written, and the model is told to copy the existing items verbatim and only re-plan the unfinished part. (Without that guard an agent that “continues” often re-derives the plan from the last few turns and quietly throws away six verified steps — this really happened.) The guard opens only when you explicitly ask to re-plan in that turn (“replan the list”, “throw the old list away”), or when the old list is fully completed (it is archived anyway) or had no completed items to lose. The rejected call is not a tool error the model should work around: the tool tells it exactly what to do next.
  • The model now sees the list it is resuming: update_todos results are tool messages and are filtered out of the request, and the list itself only lived in the conversation summary — so “continue the unfinished items” arrived with no list attached. The request now injects a <task_list> block into the system message with [x]/[>]/[ ] marks, a count of what is left and an explicit Next item to work on: #N. A fully completed or absent list injects nothing.

Both flags are persisted with the conversation (todosIncomplete / todosInterrupted in the manifest) and are mutually exclusive: one list only ever carries one of them, and both are cleared when a new list arrives or the list is archived. Older saves without these fields are treated as unmarked.

Concurrent conversations

Every conversation runs its own agent thread; they do not block each other:

  • You can start a new chat or open another history entry while a reply is streaming — the conversation you leave keeps running in the background and is marked with a blue "running" dot in the history list.

  • What the new-chat button does: if the current conversation has content, it creates a new one (a card appears in the sidebar immediately and the right pane switches to its empty chat); if the current one is already empty (0 messages), nothing is created — focus just returns to that empty chat. Otherwise repeated clicks pile up a stack of identical "New chat · empty" cards. Empty conversations that already piled up are collapsed to the newest one by the periodic cleanup (5 minute grace period; an empty conversation has nothing to lose).

  • Stop only stops the thread you are looking at; archive and delete only guard their own conversation.

  • Switching conversations never carries content across: the message list you see is always exactly the conversation you selected, and a switch is never deferred.

    • Two independent causes were fixed. First, the page-merge helper kept locally-streaming messages while the page push only carries the newest 80, and it did not know which conversation was being viewed — so the reply still streaming in the conversation you left was appended to the new one and stayed there (its completion event carries the old conversation id and gets filtered out, so nothing ever updated or removed it). Optimistic bubbles could follow the same way, and a status-only update used to rewrite the sidebar preview with an older message.
    • Second, redrawing the list is deferred while you have text selected or are interacting with a message (so a streaming re-render cannot destroy your selection). A conversation switch is not a re-render any more: it forces a full redraw and clears those interaction guards. Before the fix, selecting text in a reply and then clicking another conversation left the new title over the old messages, and a message arriving in the new conversation was appended to the old list — the two conversations visible in one list.
    • The panel now remembers which conversation the list actually shows, refuses to append into another conversation's list, and never claims "already up to date" when it is not. Loading older messages is checked on both sides too.
  • Model / mode / skills stay locked only while that conversation itself is busy, never because some other conversation is running. Permission preset, max steps and reasoning depth deliberately stay editable during a run (they apply to the next send); see the per-conversation settings below.

  • When a background thread finishes, only the history list is refreshed, so your scroll position in the current conversation is preserved.

  • The history list is ordered by creation time (newest first), not by last activity. Sending a message in an old conversation no longer bumps it to the top, so every entry keeps its place and you do not have to re-scan the list after each reply. Pinned conversations still float to the top and archived ones still sink to the bottom.

  • Copying a message that has images copies the text and the image: click Copy on the message and the clipboard receives text/plain plus image/png; pasting into the composer (⌘/Ctrl + V) puts the text in the input and the image in as a pending attachment — no need to save the picture first.

    • It copies the original image, not the 160×120 thumbnail the panel shows; jpg/webp are converted to PNG first (the async clipboard API only accepts PNG).
    • A clipboard holds one image per MIME type, so a message with several images brings the first one, with a note saying so.
    • Hovering the Copy button starts prefetching the original and converting it to PNG, so the click itself is a single write — a large screenshot will not fall back to text-only because the user gesture expired.
    • Keyboard works too: Tab to the image and press Enter to open it, or Tab to “Add to composer” and press Enter/Space to add it — the two entries never steal each other's keys.
    • If the environment refuses the image write (old engine, or the attachment was evicted from memory) the text is still copied and you are told explicitly that only the text made it — never a silent half-copy.
  • Images and attachments you already sent can be moved back into the composer: drag an image from a message onto the composer (it lights up with an accent outline; release and it becomes a pending attachment), or click “Add to composer” in the image's top-right corner. Both routes take the same path — the webview only sends the attachment identifier, and the extension resolves the content from memory by id (images keep their dataBase64); if that entry has already been evicted from the cache it is re-read from disk through the exact same reader as “attach files” (same size limits, sensitive-file rules and binary detection). Text attachments can be dragged too, and files can be dropped straight in from Finder or the Explorer.

    • The copy is a separate attachment (it deliberately does not inherit the original's internal handle), so dragging twice gives you two — no need to scroll back for a second copy. The limits match “attach files”: at most 20 items and the same total-size ceiling.
  • Queued messages are edited in the message bubble and deleted from the task tree.

    • The edit entry lives in the message bubble (a Not run yet badge plus Edit this message): it opens a floating editor (its own layer, centred over the panel) sized to the message, so a long message no longer has to be read one line at a time in the task tree. ⌘/Ctrl + Enter saves; Esc or clicking the backdrop cancels. The overlay lives outside the message list, so streaming re-renders cannot destroy it — no more "the click did nothing", "the caret jumped to the start" or "my IME composition was interrupted".
    • The agent waits for you: opening the editor puts a gate on the task queue, so when the agent reaches that message it pauses (the overlay header shows "The agent is waiting for you" with a pulsing dot). Save and it immediately reads the new text and continues; cancel and it continues with the original. The wait is capped at 5 minutes so a forgotten editor can never wedge the run.
    • While the message is still in the queue (including the brief routing moment when the relation classifier is running), saving rewrites that very message: the queue holds the request, so the agent simply reads the new text next round — no cancel-and-resend, no duplicate message, and the task-tree row and the stored user message change together, so the two can never disagree. Images and other attachments survive the edit.
    • The message list is never re-rendered while you edit: streaming output and task-tree updates are recorded and applied once you leave the editor, otherwise the editor would be rebuilt and the caret, selection and any in-progress IME composition would be lost.
    • Deleting (the button on the task-tree row) removes the queued request plus its pending placeholder reply from disk, so no orphan “queued but never ran” message is left behind. The node stays in the task tree marked cancelled — the tree is a timeline of what happened in this run, and erasing a node would pretend you never sent it.
    • A node that is currently executing offers no edit entry at all. The agent has already read that request and is running it, and the backend cannot change it (editPending always returns false); the old entry therefore fell through to "send the edited text as a new message", which queued the same work a second time. To change direction, add a line in the composer (it merges into the current branch as related guidance) or stop the run first.
    • Once a node has finished, its task-tree row offers Edit: history is history and delete is refused (with a one-line reason), but the editor opens in the message bubble titled Edit and send again, and saving sends the edited text as a new message — you can re-say what you meant, but the past is not rewritten. Whether something can be changed in place comes from whether the queue still holds it, not from a status guess.
  • "Internet reference" toggle (toolbar, where the model-refresh button used to be): one click turns this conversation into research first, then act.

    • With it on, the agent follows three phases written into the system prompt and re-applied on every request (including "continue"): ① research — search_github_repos for related mature open-source projects (sorted by stars, with license and last update), search_web for concepts and doc entry points, then fetch_url to read the primary source (official docs, spec, reference implementation) and record "URL + one-line conclusion + how this project differs"; ② align the plan — fold the findings into the task list (item one is the research itself) and reorder or replace the remaining items so they follow what was learned; ③ implement — build on what you read and say in one sentence where you deviate from a source.
    • Three hard rules go with it: never state a conclusion without the URL you got it from, never treat a search snippet as evidence (a snippet is only a lead to the primary source), and when nothing usable turns up, say so plainly and offer 2-3 candidate approaches with their costs instead of disguising a guess as research. Code is only borrowed after checking its license, version and premises.
    • The three web tools only appear in the tool list while the toggle is on (with it off the model cannot even see them): search_github_repos, search_web (whose output is explicitly labelled as leads) and fetch_url. fetch_url accepts http/https only and refuses local and intranet hosts (localhost, 127.x, 10.x, 192.168.x, 172.16-31.x, 169.254.x, *.local, …), so a model cannot accidentally probe your dev server.
    • The toggle itself is the approval, so these three never prompt per call: one research pass easily makes a dozen calls, and confirming each one turns the feature into click-work. Consent for going online is given once, per conversation, by flipping the switch (off by default); the genuinely risky direction — reaching your machine or local network — is blocked separately by the address checks. If the toggle is off and the model still calls one of these names, it gets an explicit "Internet reference is off, turn on the globe toggle first" instead of a vague "Tool not allowed".
    • The toggle belongs to this conversation: turning it on in A does not send B to the web, it is stored with the conversation, and it survives a window reload. It defaults to off. It can be flipped while a task runs — like the other three controls, the change applies from your next message (the running turn uses the snapshot taken when it started).
    • fetch_url returns the article, not a soup of tags: HTML pages go through defuddle (MIT, 9.8k★, the extraction engine behind Obsidian Web Clipper) and come back as clean Markdown — nav bars, sidebars, breadcrumbs, cookie banners and footers are dropped while headings, lists, links, code blocks and tables survive. Measured: an MDN page of 327 KB HTML → 4057 characters of Markdown. If the extracted body is under 200 characters (JSON-ish fragments, very thin pages) it falls back to the full-page text; it never returns nothing. The tool output states which path was taken ("Extracted article: Markdown…" vs "Whole page text (no article recognised, fell back)") so the model knows what it is reading.
    • Open-source licence compliance: defuddle and 18 other third-party libraries are bundled into extension.js and redistributed, and MIT / BSD-2 / ISC all require shipping the copyright notice and licence text. So the repo carries THIRD-PARTY-NOTICES.md, generated by scripts/third-party-notices.mjs from esbuild's metafile (only packages actually reachable from the entry point) and published inside the VSIX. A package with no licence file makes the build fail rather than silently shipping uncredited code. The list currently covers 19 packages: defuddle (MIT), @mixmark-io/domino (BSD-2), temml, htmlparser2, @xmldom/xmldom, @acemir/cssom, linkedom (ISC), mathml-to-latex, entities (BSD-2), css-select (BSD-2), domutils (BSD-2), css-what (BSD-2), turndown, domhandler (BSD-2), dom-serializer, nth-check (BSD-2), domelementtype (BSD-2), uhyphen (ISC), boolbase (ISC). npm run package is now three steps — compile → refresh notices → package — so the list cannot go stale.
  • Every message you send carries an execution-status badge, four colours that answer "which one never ran" at a glance: Not run yet (amber, dashed — still queued), Running (blue, pulsing dot — the agent is executing this one), Done (green, solid — finished, failed or stopped all count), Skipped (grey, dashed — the run ended without the agent ever reading it, i.e. the ignored one). Hover a badge for a plain-language explanation. When a run queues several messages and you stop and continue, these colours are how you reconcile what was actually handled instead of relying on memory.

    • The status lives on the message itself (executionStatus), not just in the task tree, so it survives the run ending, switching conversations and even restarting VS Code. Messages from older versions have no such field and show no badge — when the status is unknown we do not guess, because a wrong "Done" would make you believe work happened.
    • "Skipped" exists on purpose: when a run ends, the task tree marks its own nodes with the finish status, so the tree alone cannot separate "finished" from "queued but never ran". The badge is decided by whether the agent ever actually read the message (activated). Anything left unsettled by an abnormal exit is resolved on the next startup: running → Done, pending → Skipped.
  • Long messages you send are collapsed by default: past ~480 characters or 12 lines (either one triggers it), your message is clamped to a few lines with a soft fade and a Show full message button; short messages are untouched and get no button. Collapsing only toggles a CSS class — the markdown, tables, code blocks and file chips inside are never rebuilt, so expanding keeps your selection and scroll position, and an expanded message stays expanded when later messages re-render the list.

  • Your unsent text in the composer belongs to the conversation you typed it in. Switching conversations saves the draft and restores the one belonging to the conversation you open — text you typed in one chat can no longer be sent to another by mistake.

Per-conversation settings

  • It stops and asks when there is a real decision point. When two or more approaches are viable with materially different results, when the requirement leaves a genuine choice open, when the change is hard to undo, or when the deliverable can only be judged by looking at it (a UI, a flow, a generated artifact) and the layout/behaviour was never specified, the agent calls ask_user_choice and shows a card. Every option must state three things: what it will deliver, how far it goes (including what it deliberately leaves out and where it is still rough), and what it costs (time, blast radius, risk, follow-up maintenance). While the card is up the agent waits — it will not pick one and carry on behind your back.
    • It does not turn into “asking every step” either: it stays silent when there is only one reasonable way, when the answer is already in the code or the conversation, for reversible cosmetic choices, when you already decided, or for routine steps of a plan you approved.
    • After you pick, it follows that option and will not switch on its own; if it turns out the option cannot deliver what you expected, it explains why and asks again.
    • The card can be collapsed (the “Collapse / Expand” control on its title row): collapsed it keeps only the question, so you can scroll the conversation first and decide afterwards.
    • None of the options fit? You do not have to pick one — just type your own approach in the composer and send it; that sentence becomes the answer. It follows your approach, does not map it onto one of its options, and does not add scope you did not ask for.
  • Every line of the execution log says what it did: command steps read `npm test` → exit 0 · 12.4s instead of a bare “Command exit code 0”, and the summary redacts credentials (Authorization: Bearer …, ?token=…) while keeping non-sensitive parameters so the command is still recognisable.
  • A skill's trigger words are a separate field, so description truncation can no longer eat them. Descriptions are parsed into three parts: summary / when to use (USE FOR: Use when:) / triggers (Triggers:, or an explicit triggers: frontmatter field). Triggers are not subject to the 240-character summary cap and are rendered verbatim in the routing table (- id | name | summary | 适用:… | 触发词:…), so it no longer matters where in the description you put them; each skill in the panel takes a single summary line (ellipsis beyond that), and hovering shows the full summary, when-to-use and triggers — with 38 skills that cuts the list from 7 screens to about 4.7. The summary itself is capped at 180 characters, the “when to use” at 200 and the triggers at 160, with an explicit ellipsis when something is clipped.

Mode, model, permission preset, max steps and reasoning effort belong to the conversation itself (src/core/conversationControls.ts, src/core/modes.ts).

  • A new conversation always starts at “Ask every time” / 24 steps / “Default (model)”, regardless of older values in settings.json. Earlier versions wrote the panel's choice into global settings, so leftovers such as plaitcode.permissionPreset: autopilot and plaitcode.agentMaxSteps: 0 made every new conversation auto-execute with no step cap. Those keys are still registered (so no "unknown configuration" warning) but marked deprecated and never read; PlaitCode: Show permission scope still prints the declared values so you can reconcile them.
  • Switching conversation A to "Full access" does not loosen the permissions of conversation B running in the background, and changing B's step limit does not truncate A's next round.
  • Changes made in the panel are written back to the current conversation only — never to global configuration.
  • Permission preset, max steps and reasoning depth can all be switched while a task is running (like Copilot), and all three take effect from the next message you send — not in the round already in flight. A run snapshots its settings when it starts and every tool call reads that snapshot, so switching mid-run never rewrites the current turn into a half-old / half-new configuration; the new values are stored on the conversation and the first message after the task finishes uses them. The UI says so explicitly (each control shows “applies to the next send” while running).
  • Widening to Autopilot / Full access still asks for confirmation before it is stored.
  • Invalid stored values (misspelled preset, string step limit, non-string project root) are dropped on load and fall back to defaults instead of being carried into a run.

git and project scope

PlaitCode never commits on its own. git write operations (add, commit, push, tag, reset, clean, merge, rebase, checkout, restore, stash) are allowed only when:

  1. the user explicitly asked to commit, push or tag in the current conversation — including a follow-up message sent while the run is already going (negations such as "don't commit yet" do not count), or
  2. an enabled skill rule requires committing after finishing a task — this counts as an explicit request.

The system prompt states the same rule, but the boundary is enforced at runtime: ToolExecutor parses every command for git subcommands and refuses unauthorized ones with an explanation, and bridged VS Code tools (such as run_in_terminal) are checked through their JSON arguments so the rule cannot be bypassed by switching channels. Read-only inspection (status, diff, log, show) is always allowed.

Commits stay inside the project this conversation belongs to:

  • Each conversation binds a project root (projectRoot) on its first file write or on an explicit cwd. Relative paths, the default command cwd and newly created files belong to that project instead of "the first root of the multi-root workspace".
  • Before a git write, the real repository root is read with git rev-parse --show-toplevel and must match the project root. A repository that also contains another workspace project is refused too, because one git add -A would sweep that project's changes in.
  • While the project root is undetermined, git writes only accept an explicit cwd; the "default lands on the first root" behavior is never treated as project ownership.

Version numbers: asked after the task, never bumped on its own

PlaitCode does not bump versions on its own either. The version number is the user's decision, not a finishing step:

  • It must not edit the version field of package.json / package-lock.json / manifest.json and similar manifests, and must not run npm version / yarn version / cargo set-version / standard-version or create git tags.
  • It asks only when asking is due, and only once:
    • short tasks — after every problem mentioned in the conversation is finished and verified;
    • long tasks — at a clear phase boundary, or after the whole task is done;
    • never mid-task, and never bundled into the middle of an unfinished step.
  • Until the user says yes, versions and git history stay untouched and the remaining work continues. An explicit request ("bump to 0.2.3") or an enabled skill rule counts as permission.

The same rule is enforced at runtime (src/agent/releasePolicy.ts): when a write touches a version manifest, the project's own version field is compared and a change is refused with an instruction to ask the user first; npm version-style commands are refused as well, and bridged VS Code tool arguments are checked so switching channels does not bypass it. Read-only queries (npm --version, git tag -l) remain allowed.

Only project-level version numbers count: dependency versions inside package-lock.json, and version entries in a Cargo.toml dependency table, are not treated as bumps. When a manifest cannot be parsed the write is not blocked — refusing to break a normal file repair matters more than catching that edge.

Skills

PlaitCode scans these local formats:

  • .plaitcode/skills/*.md
  • .agents/skills/**/SKILL.md
  • .claude/skills/**/SKILL.md
  • the user skill folder in VS Code global storage
  • ~/.copilot/skills/**/SKILL.md

The star button opens the "skills used in this conversation" panel. Its ticks are wired straight to the local skill quick-launch extension: when that extension is installed, the global tick list it maintains (active in ~/.copilot/.skill-quick-launch.json) is each new conversation's starting selection. After that, ticking or unticking in the chat panel affects only the current conversation and is never written back to that list — a temporary opt-out for one task should not silently change the default for every future conversation. To change the default, tick in the quick-launch panel. Tick or no tick, "selected" does not mean "loaded every turn": in route mode the agent first sees a lightweight routing table and only reads the full text through load_skill on a match; chat mode preloads on a text match. Each reply lists only the skills actually read in that turn, and the last-used timestamp is written back to the quick-launch extension (timestamp only, never the ticks). Installing, uninstalling, enabling or disabling that extension updates the panel immediately (via extensions.onDidChange) — no window reload — and a tick change on its side is picked up too.

Without the quick-launch extension the star button shows only an install hint (with a "Not installed" badge) and an "Open extension page" button — no skill list at all: with no source for the defaults, the panel's one job is to send you to install it. The button opens the extension page inside VS Code via the built-in extension.open command (so you can tick right after installing), falls back to workbench.extensions.search, and only then opens the Marketplace page through vscode.env.openExternal. Uninstalling that extension does not delete .skill-quick-launch.json, so PlaitCode stops reading it once the extension is gone — otherwise those 30-odd stale active entries would mark every skill as "enabled by default" and pre-tick it, which looks exactly like a botched uninstall. The skills themselves are still discovered under ~/.copilot/skills/ (that is Copilot's skill directory and does not come and go with the extension); they just stop being steered by an orphaned state file.

Skills from other sources (.plaitcode/skills, .agents/skills, .claude/skills, the extension's own user skill folder) are also selected per conversation; always-mode skills join the system context directly. Simple YAML frontmatter with name and description is supported.

Permissions and privacy

  • API keys live in VS Code SecretStorage — never in the project, the conversation, or the VSIX.
  • Before the first send, the data flow is shown explicitly and must be accepted.
  • Four permission presets (no per-item custom combination), with a boundary table in settings and the same wording in the composer dropdown:
Preset Read Write Read-only commands Regular commands Dangerous commands Sensitive files
Ask every time Ask Ask Ask Ask Deny outright Blocked
Ask on risky actions Allow Allow (in workspace) Allow Allow Ask Blocked
Autopilot Allow Allow (in workspace) Allow Allow Allow Blocked
Full access Allow Allow (in workspace) Allow Allow Allow Allow
  • Read-only commands are side-effect-free (ls, git status, grep…); regular commands are everyday operations (install, build, commit…); dangerous commands cover privilege escalation, destructive deletion, disk wiping, pushes to a remote and piping remote scripts into a shell.
  • git push is always a dangerous command (not only a forced push): Ask every time denies it outright, Ask on risky actions confirms it, Autopilot / Full access run it unattended. The check skips git's global options, so git -C . push, git --no-pager push, git -c k=v push and bash -c "git push" are caught just like git push. git pull / git fetch / git clone are not in that tier: they are regular commands and run without asking from Ask on risky actions upwards (the default preset still asks).
  • Commands you must run always say which machine they run on: every command block header shows the location (local terminal / server terminal / custom) plus the exact shell. When the model omits it, the header says Location: not specified and tells you to check first — it is never silently omitted.
  • A blocked command now tells you what to do next: when path isolation refuses a location, the message says to change the path instead of retrying the same one and names the fix (keep the file inside the workspace, for example a tmp/ folder at the workspace root, or use the file tools). A policy denial is deterministic: the same command in another spelling is still denied.
  • Pattern arguments like --exclude are not file access: tar --exclude '.env', grep --exclude-dir '.ssh' and find -name '.env' are no longer blocked by the sensitive-file guard, while file-reading options (--exclude-from, -f) are still validated.
  • The git write gate no longer requires you to name the operation for clone / init / fetch / pull. These never commit someone else's changes and never rewrite published history, so they simply follow the preset (Ask every time asks once; Ask on risky actions and above run them). commit / push / merge / rebase / reset / clean still require you to have asked for it in this turn ("commit", "push", "merge main" all count) or an enabled skill rule to require it.
  • Clicking approve is authorization. The confirmation card shows the full command; vetoing it afterwards with a keyword match is what produced "I clicked confirm and it still failed". The git gate now honours that approval.
  • clone / init skip the repository-ownership checks. Both create a repository that does not exist yet, so "no repository found above" and "project not bound" are self-contradictory. A single-folder workspace also no longer needs a bound project — . has only one meaning; multi-root workspaces still require an explicit cwd so a commit cannot land in the wrong project.
  • Outside the workspace is still a hard boundary: git clone /absolute/path/elsewhere stays blocked. Cloning into the workspace (relative path or an absolute path inside it) is unaffected.
  • Writes and commands are always disabled in untrusted workspaces.
  • .env, certificates, private keys and SSH/AWS/Kubernetes credential paths follow the sensitive-file policy: blocked by default, confirmed with the target file shown when set to "Ask every time", and only read automatically when set to "Allow".
  • Tool approvals are answered inside the chat panel (a card above the composer with Deny / Allow once and collapsible details) instead of a modal dialog that freezes the whole VS Code window. While an approval is pending you can still drag sashes, switch conversations and edit files. If the conversation waiting for approval is in the background, the history list marks it with an amber "waiting for approval" dot; a request is voided immediately when its task is stopped or finished.
  • Subprocess environments strip common token, secret, password and API-key variables.
  • Remote API endpoints must use HTTPS; only localhost, 127.0.0.1 and ::1 may use HTTP.
  • No telemetry. Conversations, skills and agent audit records stay on your machine and can be deleted from settings.

See SECURITY.md for the full boundary description.

Images

  • Input images work through the normal attachment path: screenshots, files and selections are sent as image_url data URLs. Images can be dragged from a past message back into the composer.
  • Output needs an image model. Fill in Settings → Connection → Image model for the API profile you use (for example gpt-image-1, or whatever name your gateway uses for an OpenAI-compatible POST /images/generations). Leave it empty and the generate_image tool is not offered to the model at all — an unconfigured tool only produces the same error every time.
  • Generated images are attached to the reply that asked for them, with a caption, and can be opened, copied or dragged back into the composer.
  • Images in the transcript can be copied, saved and opened: hover an image (or Tab to it) for Copy image / Save…, and click the image itself to open it in the editor. Copy takes the original resolution, not the on-screen size; Save… starts in the first workspace folder and lets you pick the destination.
  • No image model no longer means a silent failure: asking for a picture shows an immediate hint pointing at Settings → Connection → Image model, and the system prompt tells the agent that image output is unavailable so it does not go install mermaid-cli / puppeteer (measured: two minutes wasted on a timeout).
  • Local images mentioned in a reply are shown automatically: if the reply only contains a path (for example `tmp/diagram.svg`) and no markdown image, the panel appends the actual image (workspace files only, at most three, never duplicated), so "it generated the picture but the chat shows nothing" cannot happen again.
  • They live in the conversation, not your repository: bytes go to <conversation>/images/<sha256>.<ext>, the message keeps only { id, label, path, bytes, mimeType }. Content-addressed, so generating the same picture twice does not duplicate it, and deleting the conversation removes the files with it.
  • Plain markdown images in a reply render too: ![caption](https://github.com/Gsaecy/PlaitCode/raw/HEAD/relative/path.png) (or <path with spaces>) is resolved inside a workspace folder and shown as a figure; absolute paths outside the workspace stay text. data:image bitmaps render inline; SVG data URLs are refused on purpose.
  • Remote images are fetched by the extension, never by the webview: ![caption](https://…) is downloaded through the same proxy/transport as every other request, saved into the conversation folder, and then shown from that local copy. The CSP stays strict (img-src ${webview.cspSource} data:), so the webview never talks to an external host and the remote server never learns that this conversation is being read.
    • The download is HTTPS-only, capped at 8 MB per image, at most four images per message, and reuses plaitcode.proxy.
    • While it is downloading (or if it fails: 404 / auth / blocked network) the reply shows a readable line naming the host — never a bare broken-image icon, and never the raw URL.
  • Image generation can live in a different API profile than chat: generate_image is offered as soon as any profile has an Image model filled in, and it always calls that profile's own endpoint and key. Settings → Connection → Image model has a Test image button that probes the endpoint for free (an empty POST /images/generations: 404 means "no image API here", 400/422 means "here, but I need the parameters").

History and cache

  • Every message is stored independently with same-directory temp files, atomic replacement and recovery backups; a corrupt index is rebuilt from disk.
  • Streaming replies are persisted every 1.5 seconds, so content already produced survives an abnormal exit.
  • Conversations can be pinned, archived, restored, searched, deleted and exported as a stream.
  • Source history referenced by a continuation is protected from automatic cleanup, and deleting a source warns about the effect on on-demand retrieval. Continuations keep the local digest created at link time.
  • Deleting only moves a conversation to the recycle bin; destroying content is your call alone: deleting moves the folder to history-v1/trash/ (content, order and attachments untouched), hides it from the list, and it can be brought back at any time with PlaitCode: Restore deleted conversations or Settings → Storage → "Restore from recycle bin". Only Settings → Storage → Empty recycle bin (permanent) (command PlaitCode: Empty the recycle bin) and "Delete local data" actually destroy content, and both ask for modal confirmation. Automatic cleanup does exactly two things: trim cache per taskCacheRetentionHours, and tidy conversations with zero messages — a conversation with content is never taken away by the agent or by a cleanup task.
  • Archiving writes a disk marker: archiving drops a .archived file inside the conversation folder and the index is reconciled against it at startup, so an archive can never silently become "cleanable" history again when manifest.json is corrupt or falls back to an older backup. Startup also compares against the previous archive list and warns immediately if an archived conversation is neither on disk nor in the recycle bin.
  • The chat record is an archive; the task tree is the agent's memory. Each turn sends only the recent slice of raw turns (about 24) plus the task tree and task list; older turns are represented by the task titles and one-line outcomes inside <project_memory> instead of being replayed word by word. Besides what was done, the memory also records the constraints the user gave ("don't touch the capsule style", "keep the Esc shortcut") so a later turn cannot undo a rule that was already set. Retrieval is automatic: every turn the host scans the older record with keywords taken from your message (fuzzy — different wording still matches) and injects the hits as <auto_recall>; tool output archived under payloads/ is searched too. For clues that only appear mid-run the model can still call search_conversation_history (archived content included). When one term maps to several tasks, it proceeds with the closest match and states the assumption, and only asks you when the candidates are genuinely tied, and if it needs the archived tool output or attachment body of one message it calls read_message_detail. The full record stays on disk unless you clean it up yourself.
  • Heavy payloads of finished tasks (reasoning, token detail, tool input/output, attachment bodies) are moved to payloads/ inside the conversation folder on schedule — not deleted, and always restorable — while the final reply, total tokens, skills actually used, tool summaries, file lists and approval results stay in the message itself.
  • Pasted and generated images are written to <conversation>/images/<sha256>.<ext> and only the path is kept in the message: a message with two screenshots drops from 2.7 MB to tens of KB.
  • Inside a single run only the six most recent tool outputs stay verbatim and older ones collapse into a one-line summary: measured on a real conversation, tool results were re-sent every step and single turns reached 1.37M–20.28M prompt tokens.
  • Both the UI and the model context have count and byte limits; attachments additionally have per-file, count and total-size limits.
  • When the disk budget is exceeded, ordinary conversations are evicted least-recently-used first; pinned, archived and running conversations are never deleted.

Install

Requires VS Code 1.106.0 or newer.

bash scripts/install-local.sh

scripts/install-local.sh picks the newest VSIX in the project root, locates the VS Code code CLI on its own, and passes --force so re-installing the same version works. When no code is found it does not just fail: it prints the two alternatives (Shell Command: Install 'code' command in PATH, or the Extensions view ⋯ → Install from VSIX…). --check reports which package would be installed and what is installed now without installing; --list only lists installed versions; for a VS Code that lives elsewhere (Insiders, say) pass PLAITCODE_CODE_CLI=/path/to/code bash scripts/install-local.sh.

The equivalent one-liner, without the script:

code --install-extension "$(ls -t plaitcode-*.vsix | head -n 1)" --force

It always installs the newest VSIX in the project root, so it never goes stale.

Reload the window afterwards (Developer: Reload Window). The chat UI runs inside the installed extension host, so without a reload you are still testing the old code.

Open the command palette and run PlaitCode: Open chat panel. On first use, open settings, create an API profile and save its API key — the key only goes into VS Code SecretStorage, never into settings.json, project files or the VSIX.

Build from source

Requires Node.js 20+.

npm install
npm run check
npm test
npm run package

The build output is plaitcode-<version>.vsix in the project root, where <version> comes from package.json. A version already published to the Marketplace cannot be uploaded again, so bump the version for every public build.

Nothing in this README needs editing when packaging: the Extensions view and the Marketplace read the version, repository, license and issue links from package.json, so they are never duplicated here. Version history lives in CHANGELOG.md.

The extension icon is resources/logo.png. Press F5 in VS Code to launch the extension development host.

Key settings

  • plaitcode.language — interface language: auto (follow VS Code), zh or en.

  • plaitcode.apiProfiles / plaitcode.activeApiProfileId — OpenAI-compatible profiles and the active one.

  • plaitcode.baseUrl / plaitcode.model — legacy-compatible endpoint and current default model.

  • plaitcode.defaultMode / plaitcode.agentMaxSteps — default mode and per-turn tool-loop budget. The budget defaults to 24 and is capped at 200; 0 (the old "unlimited") and invalid values fall back to the default, so an old saved conversation can never bypass the cap. When the budget runs out the agent stops calling tools, keeps every result, and tells you to reply "continue". Both only seed new conversations; once a conversation exists its own record wins and panel changes are written back to that conversation. Those messages also stay visible in the task tree: while no run is active the panel rebuilds a "resumed" tree from the persisted list (so it survives a window reload), and each restored node is marked Resumed with an accent bar and a tooltip explaining why it is there. Restored nodes can be edited or deleted straight from the tree without waiting for a run. - Messages you send while the agent is busy are never dropped. Each queued message is stamped with its arrival order, and a later message that would normally merge into the running branch is held behind any earlier message that is still waiting its turn - so the order you sent them in is the order they run, and an earlier message can no longer be starved out by a branch that hits the step budget or is stopped. The step budget is per branch (a queued message gets its own), and the agent loop extends the budget while the queue still holds something instead of ending the turn. On any finish - completed, stopped, or failed - the remaining messages stay listed as "not run" (user bubbles keep the not-run-yet badge instead of being marked skipped, and placeholders say the next turn will continue), and the ids are persisted per conversation. The next turn (including the Continue button) reads that list and re-queues the messages in their original order; deleting a message removes it from the list so it is never executed.

  • Six task types get their preferred tools from the host (not suggested by the prompt): web-preview, image-generation, git-write, test-run (the command is detected: pnpm/yarn/npm, go, cargo, pytest, make, composer, rspec), release (asks for the version first, never lets npm version rewrite manifests on its own) and sensitive-config (reads .env.example templates instead of the real .env). Three gates apply together: the offered tool list is narrowed, a wrong tool is denied at execution time with the right one named, and the prompt directive is only the third line of defence. A write intent always disables narrowing, so "run the tests and fix what fails" can still edit files. When a path is rejected the reply now contains a runnable replacement (/tmp → a tmp/ inside the workspace).

  • Showing the user a local page / starting a server: run_command accepts background: true (starts the process, returns immediately with a background id, and is cleaned up when the session ends or you press Stop), then open_web_preview opens http://127.0.0.1:<port>/. Do not use the bridged VS Code terminal tool (run_in_terminal) — it requires a chat-request invocation context, which an independent panel can never provide, so it is no longer offered at all. Server-class commands (python3 -m http.server, pnpm dev, vite, uvicorn, php -S and friends) are moved to the background by the host even when the model forgets the flag, because the foreground path kills the whole process group when its timeout expires — a start command that "runs" and then leaves an empty port is exactly the "preview will not open" report. Before opening a local preview URL the panel makes one TCP probe: nothing listening means the preview is not opened at all, and the reply names the port plus the exact background: true call to retry, instead of silently showing an error page.

  • Streaming tool updates are patched in place instead of rebuilding the message. A tool-status push used to replace the whole message node, which restarted the pending badge's pulse animation, dropped text selection inside the command, re-created the copy button under the cursor and reset pre scroll — all of which reads as flicker on an expanded command step. The panel now matches each step by callId and updates its status, summary, meta and body in place (skipping the badge when the status has not changed), only rebuilding a body when its content signature changed, and it handles the mixed case — text growing and a tool changing in the same frame — by patching the step first and then appending the text. Anything structurally different still falls back to a full rebuild.

  • The plaintext-credential warning no longer fires on a reference. password: process.env.DB_PASSWORD is not a secret, but the assignment rule only looked at "a field named password followed by 8+ characters" — and that expression happens to be exactly 23 characters, which is what the warning reported. Values that clearly point elsewhere (process.env.X, os.environ[…], ${X}, $X, %X%, an ALL_CAPS variable name, a dotted property chain, undefined/null) are now skipped on the assignment path only; fixed-format keys (AKIA…, sk-…, ghp_…) are still matched, and a literal secret is still reported. The same pass closed a real gap: DB_PASSWORD=<literal> in a pasted .env was not detected at all before.

  • Answering a plan question leaves a message bubble — with its attachments. Both ways of answering used to leave a trace only inside the tool result (typing your own approach went into the ask_user_choice return value; clicking an option left nothing at all), so the conversation showed "asked → carried on" with your answer missing, and the attachments were cleared outright. Each answer is now stored as a real user message (done): typed answers keep their text, attachments are first turned into real paths (pasted images go into attachment-cache, picked files keep their original path, selected text is inlined) and listed in the answer so the model can open them, and clicking an option records "Chose option: …" together with anything attached at that moment. Attachment-only answers count as answers too.

  • Clicking a line in the task tree jumps to that task's output cursor. Task nodes now carry the reply message id (they only had the user message before, so a jump landed on your own sentence), the whole row is clickable (Enter/Space too, and the inline delete/edit buttons do not trigger it), the scroll anchor is the streaming .stream-cursor rather than the top of the bubble, and the virtualised window is moved first when the target is off-screen. Auto-follow is switched off after the jump so the next delta cannot drag you back to the bottom, and the landing spot flashes for two seconds. This is what makes merged execution readable: when a later message finishes first and the middle one runs afterwards, the cursor sits mid-list and one click gets you there.

  • Web search actually returns results again. Its only backend (Bing's format=rss) now answers HTTP 200 with an empty channel, so every query came back as "no results". search_web now queries three sources in parallel and merges them: Bing RSS, Stack Overflow and Hacker News (the last two need no key). Hits are labelled with their source, every source is retried with a relaxed query because all of them AND their terms, and when everything is empty the reply lists what each source said instead of a bare "nothing found". search_github_repos likewise auto-relaxes a zero-hit query (six words AND-ed together is almost never a real repo) and says which shorter query worked.

  • A redundant cd into the directory you are already in is dropped before running (and the result says so). run_command's cwd is the conversation's project root, so cd "Personal Workstation OS" && … looked for a same-named subdirectory and always failed with /bin/sh: cd: … No such file or directory. It is stripped only when all three hold: the command starts with a single-argument cd, that target does not exist under the cwd, and its last segment equals the cwd's basename.

  • Expanding a command step no longer flickers while the agent is streaming. Two causes were fixed: the lazily-built body used to appear one frame after the <details> was restored to its open state (the toggle event that triggers the build is dispatched asynchronously), so a node was briefly inserted open-but-empty; and the pre blocks holding the command and its output are their own scroll containers, so replacing the whole message reset them to the top mid-read. And the real culprit: tool updates no longer rebuild the message. Matching each step by callId and updating it in place keeps the animation, the text selection inside the command, the hovered copy button and the pre scroll position alive; a body is only re-created when its content changed, and the mixed case (text growing plus a tool changing in one frame) patches the step first, then appends the text. The body is now built synchronously when the open state is restored, and every pre inside the message has its scrollTop/scrollLeft carried over to the replacement. - A leading cd now decides how later ../ paths resolve: cd …/src-tauri && mkdir -p ../tmp/x was rejected as out-of-workspace because only the tool's cwd argument was used. Each &&/;/newline segment now resolves against the directory in effect at that point (only a plain cd <one path> moves it; cd "$(…)" does not). - Bridged VS Code tools also answer to their natural names: calling open_browser_page instead of plaitcode_vscode_open_browser_page_<hash> used to come back as “tool not allowed”; the bridge now resolves the bare name first (plaitcode_* stays reserved).

  • A failed edit explains itself instead of just saying "oldText does not exist". If the newText is already in the file the call reports success with the line number and leaves changedFiles empty, so re-running the same edit no longer looks like a failure (a repeated edit used to send the model off trying other spellings). When the text really differs, the reply carries the file's real content at that position — either "the content is there from line N, only the whitespace differs" or "the first line matches at line N, everything after it changed" — bounded to 14 lines, so the model pastes the truth instead of guessing again. - A command timeout is no longer silent about the cap. run_command keeps plaitcode.maxCommandSeconds as a hard ceiling, but it now reports both numbers — timed out (120s) (asked 900s, capped at 120s) — and the result carries three ways forward: raise the setting (max 900), run it in the background with output redirected to a log inside the workspace and poll tail -n 60, or stop wrapping long builds in | tail -40 (that buffers everything, which is why the timeout arrives with no output at all). A timed-out command is always reported as an error now, even if its exit code happened to be 0. Heredoc bodies (python3 - <<'PY' … PY) are no longer scanned as command-line paths either: a CSS comment starting with /* used to be rejected as an out-of-workspace path, and only quoted absolute paths inside the body are still checked (so open('/etc/passwd') stays blocked).

  • plaitcode.searchExclude — extra directory names excluded from PlaitCode's workspace search (editable in Settings → Agent → Search exclusions; commas, ideographic commas and newlines all work), on top of the built-in list (.git, node_modules, dist, build, out, coverage, .next, .turbo, .venv, venv, __pycache__, DerivedData, .cache). Searches also run one at a time, identical concurrent searches are merged, and results are cached for ~1.5 s with invalidation on every write/save/delete. Commands get their own limit of two and drop to one at a time for 5 s after an EAGAIN-class resource error. The skill list is no longer rescanned on every state push (30 s freshness window plus request coalescing, with watcher-driven forced refreshes), command output is accumulated within a byte budget instead of re-encoding the whole buffer per chunk, and history is read once instead of twice at startup. PlaitCode: Show resource stats prints live search/command counters for troubleshooting.

  • plaitcode.reasoningEffort — five levels (default, none, low, high, max). The picker follows what the model itself declares (DeepSeek's /models lists low/high/max under effort.supported_levels; none is not in that list because it means "thinking off", so it is always offered for any reasoning-capable model). Choosing "none" really turns thinking off (thinking: {type:'disabled'} + reasoning_effort: 'none'). Endpoints without support get an automatic retry. Also only a default for new conversations.

  • plaitcode.permissionPreset, plaitcode.agentMaxSteps, plaitcode.reasoningEffort — deprecated, no effect. Every new conversation starts at “Ask every time” / 24 steps / “Default (model)”; adjust the three under the composer for the current conversation (24 / 68 / 120 / unlimited; Default / none / the depths the model declares; four presets) and the choice is stored with that conversation. The keys stay registered only so old settings.json files do not report unknown settings.

  • plaitcode.fileReadPolicy / plaitcode.fileWritePolicy / plaitcode.commandPolicy / plaitcode.dangerousCommandPolicy / plaitcode.sensitiveFilePolicy — fully derived from the preset; display-only, marked deprecated in the VS Code settings UI.

  • Permission settings are resource-scoped and may be set in a folder's .vscode/settings.json. Precedence is most-specific-first (workspace folder → .code-workspace → user), and when folders disagree the strictest value wins (Ask every time > Ask on risky actions > Autopilot > Full access).

  • plaitcode.allowSensitiveFiles / plaitcode.allowDangerousCommands — deprecated booleans, used only as a migration fallback when the newer settings are absent.

  • Every resident cache now has a byte budget, not just an entry count: message page cache 24 MB (it used to be "at most 8 pages" — 48 MB when full; 5 conversations measured 17.7 MB on this machine), search-result cache 8 MB, search scheduler cache capped at 48 entries with expired pruning on every write (it previously had only a 1.5s TTL, so keys that were never queried again stayed forever), attachment body index 16M chars. Over budget evicts the oldest; a single item over budget is not cached at all. PlaitCode: Show resource stats prints four memory · … lines with each cache's current usage and limit plus heap/rss.

  • History lists no longer carry task-archive blobs: 96% of that payload used to be todoArchives (measured: 5 conversations 174.9 KB → 7.1 KB; extrapolated to 100 conversations 3.42 MB → 142 KB) even though the sidebar never reads it — the archive capsules read the top-level field. Lists now send a trimmed summary.

  • Attachments in history never silently fail: image bodies live in one evictable in-memory index (16M chars), but each attachment also has an eviction-proof pointer. On a miss PlaitCode re-reads the message from storage (0.6 ms measured) and puts it back in the index — both "add to composer" and "copy image" go through that recovery path.

  • The message list only renders the screen you are looking at. Copilot's chat list is VS Code's WorkbenchObjectTree — a virtualized list where off-screen rows have no DOM at all — while PlaitCode used to render every message it knew about. Measured: 600 messages with six tool steps each came to 38,400 nodes and +231.6 MB of renderer memory, at a flat ~0.39 MB per message from 50 to 600 messages. Now only the viewport (plus eight messages of overscan on each side) is in the DOM, with two spacer blocks holding the height of the rest: +23.4 MB / 706 nodes, and a 200-message conversation drops from +83.1 MB to +16.3 MB. Three promises hold this together: a window swap re-anchors on the message at the top of the viewport and its exact on-screen offset (so scrollbar drags, PageUp and loading older messages never jump), the bottom is pixel-exact because the last window has no trailing spacer, and details you expanded are remembered in detailOverrideStore so they are still expanded when you scroll back. Conversations under 60 messages still render in full — at that size it is a few MB and not worth the complexity. The trade-off: a selection can only span messages currently in the DOM, and "scroll to latest" jumps instead of animating (a smooth animation re-measures the scroll height every frame, so its target goes stale immediately).

  • State pushes only carry what changed: when the message list is unchanged (pinning, archiving, settings), PlaitCode no longer re-sends the first page of message bodies — on a real 1513-message conversation the first 80 messages alone are 5.39 MB and one push costs ~27ms of main-thread work, while sendState() has 22 call sites. The signature covers id / status / updatedAt / content and reasoning length / tool count with last-step status and output length / attachment count, so a real content change always differs; a rebuilt webview bumps the generation to force a full push. The attachment cache is pruned on the cleanup heartbeat (30 days / 200 MB, never touching files written in the last hour).

  • Automatic cache cleanup never blocks the UI: it is queued one conversation per task instead of one 154-line task holding the write queue (measured during cleanup: sends wait 41ms median / 169ms worst, while the whole round is 366–761ms), the first scan is delayed to 20s after activation to avoid VS Code's own startup I/O, and automatic heartbeats stand aside while a conversation is running (the manual "Clean cache now" still runs). A full round over a real 63.4MB archive takes 761ms on an idle machine — a multi-second entry in the log means the disk was busy with something else, not that the algorithm is slow.

  • plaitcode.proxy — HTTP proxy for API requests (e.g. http://127.0.0.1:8080); empty means direct. Editable in Settings → Connection → API proxy; saving validates it (a socks:// URL is rejected with a hint to use the HTTP port, malformed URLs are refused). It has to be set by hand, for two measured reasons: Node's fetch (undici) ignores HTTPS_PROXY (pointing the proxy at a dead port still connects directly), and VS Code's http.proxy does not cover extensions ("Extensions don't benefit yet from the same proxy support that VS Code supports"). When set, requests go through a real CONNECT tunnel (proxy auth supported; socks:// is not — use the proxy's HTTP port). Nothing is auto-detected on purpose: a leftover env var pointing at a closed port would break the direct route that works.

  • Connection failures no longer surface as a bare fetch failed: the message carries the real cause and a fix (DNS failure / connection refused / timeout / certificate replaced by a proxy), and PlaitCode retries only when no response headers were received (2 retries, 400ms then 1200ms) — never after a response, so nothing gets billed twice. Every network event is logged to the [net] lines of the PlaitCode output panel, and PlaitCode: Test endpoint connectivity reports DNS → TCP → TLS (protocol + certificate expiry) → HTTP with timings, plus a proxy-tunnel check when a proxy is configured.

  • The timeout measures silence, not total duration: plaitcode.requestTimeoutSeconds (120 by default) used to cap the whole stream — one timer armed at request start, aborting at the deadline. A long answer or a turn with several tool calls therefore failed at second 120 even while every token was arriving, leaving only "Request timed out (120s)." Every chunk now resets the clock, so a request only times out after N seconds with no bytes at all, and the message says exactly that.

  • Server overload is retried: 503 Service is too busy / 429 / 500 / 502 / 504 mean the request was not processed, so PlaitCode retries with 400ms → 1200ms → 3600ms backoff (4 attempts max; a Retry-After header wins, capped at 10s). 401 / 400 are never retried — retrying them would only cost money. When retries run out, the message says the overload is temporary and that sending again usually works.

  • plaitcode.taskCacheRetentionHours / plaitcode.cacheBudgetMB — task cache trimming and a disk-usage warning. PlaitCode never makes a conversation disappear on its own: automatic cleanup only strips regenerable payload (per taskCacheRetentionHours) and tidies conversations with zero messages. historyRetentionDays and cacheBudgetMB no longer trigger deletions — the budget only shows a hint with an "Open settings" button. Deleting a conversation moves it to history-v1/trash/ (restorable via PlaitCode: Restore deleted conversations or the Settings button); only you can destroy content, through Settings → Storage → "Empty recycle bin (permanent)" or "Delete local data". There is no time- or size-based auto-purge of the recycle bin.

Conversation data lives in the VS Code global storage directory and is never written into your project. Archiving writes a .archived marker inside the conversation folder, so a corrupt or stale manifest.json (including the manifest.json.bak fallback, which holds the previous write) can never turn an archived conversation back into deletable history.

Repository layout

Path Contents
src/core/ settings and validation, permissions (four presets, command tiers, path rules), conversation storage and cleanup, recycle bin, approval-plan bridge to VS Code, task lists (todos.ts, todoArchives.ts), decision gate, model capabilities, i18n (i18n.ts), ids and atomic JSON helpers, and the memory layer added in 0.4.3: contextWindow.ts (what still goes to the model + the work digest), taskMemory.ts (task tree as memory: constraints, outcomes, per-task checklist attribution), searchText.ts (normalisation, tokenising, fuzzy matching, ambiguous-term resolution)
src/agent/ agent loop and stop conditions (agentRunner.ts, agentLimits.ts), tool executor and every guard (path isolation incl. per-segment cd resolution and heredoc bodies, sensitive files, git gate, version-bump gate, command risk, commandTimeout, serverCommands), skills, task queue / router / review (taskQueue.ts keeps arrival order, retains unexecuted messages and re-seeds them), search scheduler, workspace search, file-reference resolution, web research and extraction, recovery hints (pathHints, replaceDiagnostics, commandHints, previewProbe), the prompt fragments (todoPrompt, replyShapePrompt, followUpPrompt, noticePrompt, commandPrompt), audit log, network retry helpers
src/views/ chat panel (webview host + message protocol), settings panel, webview shell, render signature
src/providers/ OpenAI-compatible streaming client, network diagnostics and classified retries (netDiagnostics.ts), staged connectivity probe (netProbe.ts), real CONNECT proxy tunnel (proxyFetch.ts), image generation/download/probe, text-only-model fallback (visionFallback.ts)
media/ webview assets. chat.js renders the panel; the pure, unit-tested helpers are code-block-meta (fence location/tool), follow-up-format (checkbox stripping), secret-scan (credential warning), todo-panel-state, callout-meta (notice severity), file-reference, toast-timing, inline-append (when a delta can be appended as plain text), stream-repair (unterminated tail markdown), ui-icons (every icon shape, inline SVG with currentColor)
docs/screenshots/ screenshot build script, the generated English page and the README image
docs/ARCHITECTURE-REVIEW.md architecture and feature inventory written for external review: layering, data layout, agent loop limits, tool system, permission model, memory, network layer — plus 12 specific review targets with code coordinates (SSRF redirect handling, prompt injection, command-tier bypass, approval scope, path isolation, sensitive-file matching, cross-window storage concurrency, embedding egress, panel state machine, abort classification, audit redaction, webview trust boundary) and a "deliberate trade-offs" list so those are not reported as bugs
test/ preview-*.html fixtures plus 67 standalone checks run with plain node. Only a representative subset is listed here — run ls test/check-*.mjs for the full set. Coverage areas: DOM / geometry (check-panel-exclusivity, check-capsule-geometry, check-capsule-drag, check-icons-dom, check-icon-geometry, check-file-reference-dom, check-stream-patch, check-tool-detail-lazy, check-list-virtualization, check-command-location), behaviour wiring (check-todo-actions, check-todo-capsule, check-todo-scope, check-resume-scope, check-runtime-controls, check-skill-toggle, check-skill-routing, check-command-notify, check-title-editing, check-draft-isolation, check-send-latency, check-stream-scroll, check-state-payload), safety and policy (check-storage-trash, check-git-access, check-git-push-tier, check-secret-warning, check-memory-budget, check-request-timeout, check-network-diagnostics, check-webview-scripts, check-settings-coverage, check-screenshot-dict), the recovery paths added in 0.4.1 (check-no-skip, check-path-hints, check-replace-diagnostics, check-preview-guard, check-command-timeout, check-tool-block-flicker, check-vision-fallback, check-bridged-tools, check-tool-playbooks), 0.4.2's check-task-jump, check-decision-attachments, check-search-and-env, 0.4.3's check-context-memory (37 behavioural assertions on the memory model, including a replay of the real 2747 KB message that used to wipe the request), and 0.4.4's check-image-attachment (broken-image recovery, driven through the real media/chat.js in headless Chromium). Several of these drive the real media/chat.js in headless Chromium, so "does the UI actually do it" is asserted, not assumed.

The screenshot is generated with node docs/screenshots/build.mjs. It reuses the real webview CSS and the real English dictionary, so the image matches the shipped UI, and it renders an empty new conversation: no conversations, messages, task list, attachments or typed input are included.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft