Show HN: Harny – AI coding agent for VSCodium/VS Code tuned for small/local LLMs A developer released Harny, an AI coding agent extension for VSCodium and VS Code that runs in the Activity Bar and connects to any model through the OpenAI Chat Completions API, including local models served by Ollama, LM Studio or llama.cpp. Harny adds a two-stage Analyze/Build workflow in which file-modifying tools run in dry-run and return exact diffs before anything is written, plus a Parallel mode that splits tasks into sub-agents and context compaction at turn boundaries for long sessions. The developer reports the agent's own test suite passing 2,988 tests across 133 files in 20.39 seconds, and states that session transcripts are stored in a central SQLite database outside the project so agent tools cannot read or corrupt them. A full agent that lives in your Activity Bar. It reads your project, edits files, runs commands, searches the web and keeps one persistent conversation per folder — with tool calling and live streaming. Bring your own model. Cloud, or a model on your laptop. One protocol: the OpenAI Chat Completions API. Retry-with-backoff in src/llm/http.ts, then run the suite. Build · deepseek-v4.1-flash · 6.9k in · 74 out · ⚡ 6.1k · elapsed 2.3s · first token 676ms ▸ Thinking… No retry on this path: a 429 or a 5xx goes straight back to the user. The loop has to stay on the client so the budget is ours, and it has to stop before the turn's deadline. ▾Readsrc/llm/http.ts Input { "path": "src/llm/http.ts", "offset": 42, "limit": 9 } Output js async request url: string, init: RequestInit { for let attempt = 0; ; attempt++ { const res = await fetch url, init ; if res.ok || isRetryable res.status return res; await sleep Math.min 2000, 250 2 attempt ; } ▸Shellnpm test Test Files 133 passed 133 Tests 2988 passed 2988 Duration 20.39s Build · 257.4k in · 775 out · ⚡ 257.3k · elapsed 9.8s FocusCollapse allFollow Insert prompt in QUEUE Ask Harny… Enter to send, Esc to abort Build⌄ Parallel AI Model:deepseek-v4.1-flash · 1M · out 32k⌄⚙ Tokens259.3k/ 616k/1M 42% ⚡ 259.2k 100% Compact Auto 80% ctx · keep 10%⚙ DEMO / ONE SESSION The site you are reading, built by the agent. “Harny creates its own website” — the session that produced this page, recorded end to end. Every design decision in Harny answers a failure mode of agents that write into your repo without asking. Here is what that buys you. Two stages: preview, then apply In Analyze, every file-modifying tool runs in dry-run — it returns the exact diff and writes nothing. You see what would change before anything is touched. Switch to Build when you are happy. safetydiffs Bring your own model OpenAI, Anthropic, OpenRouter, or a model on your own machine with Ollama, LM Studio or llama.cpp. One dropdown, per session. Real parallelism Turn on Parallel and the agent becomes an orchestrator: it splits the task into independent sub-tasks and runs them as sub-agents — each with its own stream and its own stop button. You are never locked out Keep typing while it works. Enter queues, ⌘/Ctrl+↵ steers mid-flight. Esc stops everything. Long sessions keep working When the context fills, Harny compacts at turn boundaries, keeps the recent part verbatim and carries the state of the work forward. Nothing is hidden Every turn shows real token usage and timings. Every tool call shows its input, its output and its diff. Reasoning streams as it happens. Focus opens every section as the agent enters it and leaves it open — the run stays readable top to bottom, and you can steer the moment something looks wrong. Collapse all is the one word for the opposite. Your history lives outside your project Sessions are stored in a central SQLite database — not in your repo. Agent tools can never read or corrupt transcripts, and cleaning your project never deletes your chat history. 02 / ANALYZE & BUILD Look before you leap. A run is born with its mode and keeps it to its last tool result. The pills explain why instead of swallowing the click — Stop is the way to interrupt. New sessions start in Analyze — your first run is a preview, not a surprise. Only the write is withheld: reads, greps and searches still run. When previews are ready, the host asks once whether to switch to Build. Mode and Parallel are locked while a run is going. AnalyzeBuild HARNY ?+⚙ ▸Sessions?+⚙ Harny Dev × How does the retry guard look today? Analyze · deepseek-v4.1-flash · 4.1k in · 26 out · elapsed 1.1s ▸Readsrc/llm/http.ts if res.ok return res; throw new Error HTTP ${res.status} Add retry-with-backoff to src/llm/retry.ts. Analyze · deepseek-v4.1-flash · 6.2k in · 41 out · elapsed 1.4s ▾Writesrc/llm/retry.ts+24−0 Input js { "path": "src/llm/retry.ts", "content": "export const isRetryable = …" } Diff @@ -0,0 +1,22 @@ Analyze · nothing written — 1 file awaits Build FocusCollapse allFollow Insert prompt in QUEUE Ask Harny… Enter to send, Esc to abort Analyze⌄ Parallel AI Model:deepseek-v4.1-flash · 1M · out 32k⌄⚙ Tokens6.2k/ 616k/1M 1% Compact Auto 80% ctx · keep 10%⚙ Switch to Build? Changes were prepared as previews — nothing has been written to disk yet. Switch to Build to apply them. Tip: restart the chat — a clean Build context applies more reliably than continuing this Analyze transcript. CancelSwitch to Build 03 / PARALLEL One orchestrator. Many hands. Disjoint files run in parallel. Overlapping writers — or a writer and a reader of the same resource — are serialized automatically, because every Delegate declares its resources honestly. ORCHESTRATORDelegate ×3depth cap 1 · concurrency capped agent · testsstreaming Write vitest coverage for src/sessions/compactor.ts ReadWriteShell agent · docsstreaming Update README.md compaction section + table ReadEdit agent · typesqueued Fix tsconfig strict errors in src/core/llm ReadEditShell Stop aborts the whole run. ⏹ stops one bubble — running or queued behind the cap. A stopped sub-agent reports aborted, so the orchestrator never treats it as done. Sub-agents inherit the loop guard, the tool budget and the skills catalog. WATCH / PARALLEL RUN The diagram above, running for real: one orchestrator, three delegates, overlapping files serialized on the fly. The context window is visible in the transcript: a divider marks where the context begins, and the checkpoint is one card with its summary attached. CONTEXT FILL82% ✦ checkpoint summary in windowkept verbatimusable headroom Turn boundaries The cut falls between complete turns — your input → the final answer, everything in between — and inside one only when that turn alone exceeds the budget. Land at 10% The trigger defaults to 80% of the usable context; the most recent share stays verbatim. Two independent knobs, one honest preview of the plan. State carried forward A later compaction updates the previous summary instead of summarizing a summary — a fact is not lost per generation. Masked, never rewritten Old tool outputs go as one-line stubs that name the tool. The transcript, the store and any branch keep everything. Rejection is data A context-length error triggers one compaction and a retry — and the limit the provider states is adopted as the session window. Wire rules first Eight rules are checked before the wire. A violation is refused by name, instead of poisoning every later request. YOU Add a retry helper and wire it into the HTTP client. ✦ CHECKPOINT Done:withRetry in src/llm/retry.ts, exported. Open: call sites — http.ts:42, models.ts:88. Next: run npm test, expect 2 failures. Facts: cap 2000ms; retry on 429 and 5xx. 18 messages above · kept in the session, out of the context window EVIDENCE / TWO BILLING PERIODS Two months of the same subscription, the same model, the same kind of work. The one thing that changed is how much context rides on every request. Before95%used · forecast 116% — the limit arrives before the cycle endsAfter44%used · forecast 94% — the same month lands under the limit Not a cheaper model. Both periods are ~100% DeepSeek V4.1 Flash: the tokens went down, the model did not. A window that stops compounding. Every turn re-sends the whole context, so the same 100k costs the same tokens on turn one and on turn forty. A summary in the window — instead of the turns it absorbed — plus old tool output masked to one-line stubs is what makes the next request smaller rather than bigger. The advice is the mechanism. Pasted logs, whole files and re-reads are what fill a window; the checkpoint keeps the facts, and the cycle closes at 94% instead of overshooting at 116%. WATCH / CONTEXT COMPACTION The meter above, filling up for real: the cut between complete turns, the checkpoint card, the window moving on. Every tool is a class in its own file behind a small interface. Adding one is registering it — the agent and the providers never change. MCP servers arrive as mcp