Skip to content
Topics

AI Development & Programming: Build Apps with AI

Build smarter with AI-powered development. Code generation, app building, debugging, and test automation guides.

124 articles

Sort articles to find what you need

Articles in AI Dev & Programming

Claude Code Remote Control: Drive Your Own PC From Your Phone

Claude Code Remote Control: Drive Your Own PC From Your Phone

Remote Control connects the Claude mobile app or claude.ai/code to a Claude Code session already running on your own machine, and the point most explanations miss is that nothing moves to the cloud: code execution and filesystem access stay local the whole time, and the phone is only a window into that session. This article works through what that design buys you and what it costs. Your local filesystem, MCP servers, tools and project configuration all stay available (typing @ autocompletes paths from the local project), the conversation and subagent progress stay in sync across terminal, browser and phone, and a sleeping laptop or a dropped connection is survivable because Claude Code reconnects and delivers queued updates once it recovers. The requirements are stricter than they look: Pro, Max, Team or Enterprise (API keys are not supported), a claude.ai login rather than a setup-token, a direct connection to api.anthropic.com, and none of the four telemetry-disabling environment variables set, which is why privacy-minded users who set DO_NOT_TRACK are told the feature is not enabled on their account. Three entry points are covered (/remote-control to carry over the current conversation, claude --remote-control, and server mode with its --spawn, --capacity 32 and --continue flags), along with the split between slash commands that work remotely and the local-only ones such as /resume, the five-minute dialog expiry that does not apply to permission prompts, and the two push-notification toggles. On security, the article is deliberate: no inbound port is ever opened, so the network attack surface all but vanishes and the risk moves to the account, the QR code is a shortcut rather than authentication, and the default gate is exactly one signed-in account, which makes a passkey the highest-value step. Transcript retention (5 years or 30 days), what to do if the phone is lost, Trusted Devices with its 18-hour sign-in window, the ten-minute server-mode timeout, the four-hour resume window, the tmux requirement on remote machines, a troubleshooting table keyed to the actual error messages, and a comparison with Dispatch round it out.

Claude Adaptive Thinking vs Extended Thinking: What Changed

Claude Adaptive Thinking vs Extended Thinking: What Changed

The way Claude thinks went through a generational change. The old extended thinking had you specify a token budget on every request — thinking: {"type": "enabled", "budget_tokens": N} — but the right budget differs per task and can't be guessed in advance, and changing it invalidates the prompt cache. The current adaptive thinking is one line, type: "adaptive": whether to think and how deeply is the model's own decision based on how hard the request looks. The migration was staged: budget_tokens was deprecated on Opus 4.6 / Sonnet 4.6 and is rejected with a 400 error from Opus 4.7 onward. This article condenses the per-model rules into one table — Fable 5.1 and Opus 5.5 think always (cannot be disabled), Sonnet 5.5 defaults to thinking on and rejects disabled with a 400, but between_tools turns off only up-front thinking (effort high or below), the legacy Opus 5 and Sonnet 5 default to thinking on (on Opus 5, disabling is only allowed at effort high or below), Opus 4.8 / 4.7 require an explicit adaptive setting, and models that support only extended thinking, such as Haiku 4.5 / Sonnet 4.5, still use budget_tokens as their only mode. Depth control moved to output_config: {"effort": ...} with five levels (default high on most models, medium on Opus 5.5 and Haiku 5.5), and changing effort busts the cache the same way changing the budget used to. Visibility is governed by display: the new-generation default is "omitted" (empty thinking blocks), and you are billed for the full thinking tokens either way — measure with usage.output_tokens_details.thinking_tokens; no setting ever returns the raw chain of thought. Disabling thinking on Opus 5 carries documented side effects (tool calls written as plain text, internal tags leaking), so lowering effort is the safer cost lever. Interleaved thinking — reasoning between tool calls — is automatic under adaptive, with the old beta header no longer needed. And when you need speed, fast mode runs the same Opus at about 2.5x for 2x the price (Opus 5.5/5/4.8 only, toggled with /fast in Claude Code). Everything is grounded in Anthropic's official Thinking, Extended thinking, and Fast mode documentation.

"GPU process gone" — Claude Desktop freezes and takes every Claude Code session with it

"GPU process gone" — Claude Desktop freezes and takes every Claude Code session with it

Claude Desktop freezes mid-task and every Claude Code session you had open stops at the same moment; you force-quit it, and sometimes the app then refuses to start at all. The last line in %APPDATA%\Claude\logs\main.log is almost always the same one: GPU process gone, with exitCode 101457950 (0x060C201E). This article sets out what that code is, why sessions with nothing to do with each other go down together, and which remedies are real. The first move is a separation: Claude Code (the CLI) is not what crashed — the GPU process of the Electron desktop app that hosts it is. The second is why the damage spreads so far. Chromium concentrates rendering in a single GPU process, and there is exactly one of it per application, shared by every window, tab and session; so one heavy page opened in the in-app browser can take down eight unrelated sessions at the same instant, and no user-facing setting separates them. Triggers come next. The in-app browser dominates the public issues — #80444 records the process dying 15 to 36 seconds after a page ran WebGL/WebGPU feature detection, four times with the same exit code; #82967 pins the trigger on the browser tool's preview screenshot capture; #83478 reproduces it with a continuously refreshing preview left open. But the browser is not the only trigger: #68049 reports the same code at launch on ARM64 with no browser interaction at all, and #83028 reproduces it on an Intel integrated GPU. Diagnosis is then made concrete with three files — main.log, unknown-window.log (a CONTEXT_LOST_WEBGL at the same timestamp) and the Crashpad folder — plus a table separating 101457950 from the exit codes that mean a clean shutdown, and a warning that the requestAdapter powerPreference line in the same log is a normal Chromium message rather than a sign of a crash. Recovery covers Repair for the case where Windows marks the package Modified and refuses to launch it, alongside the report where the state reached Modified, NeedsRemediation and only a complete removal and reinstall brought the app back; saved transcripts survive, but work that was in flight does not (#81698 lost a set of parallel subagent results). It closes with what helps and what does not — --disable-gpu is rejected on the MSIX build, updating the app did not stop it here, isolating the GPU process is structurally impossible — the hybrid-GPU pinning tip and why no report of it helping with this symptom has been found, and how to tell a Store update's forced quit apart from a real crash.

What deleting our whole admin panel taught us — when a UI survives the AI era, and when it can go

What deleting our whole admin panel taught us — when a UI survives the AI era, and when it can go

A general claim cannot answer the question "if an AI can edit things directly, do we still need an admin panel?", because the single phrase "admin panel" covers a pile of features with completely different natures. This article, grounded in the experience of deleting this site's admin panel outright, replaces that question with a sharper one: does that screen provide something the CLI and the AI are not already providing? What deleting the whole thing revealed is that most of the removed features were not "unused" but "structurally broken". Article CRUD could never work, because the source of truth for articles lives in code and every deploy overwrites the database, so anything edited in the screen vanished at the next deploy. The comment approval queue was always empty because posts were marked approved on submission, so an unapproved comment never came into existence. A feature nobody uses is a feature nobody can tell is broken. The one capability that could not go was comment deletion, and even that had no inherent need to be an admin panel: a delete button on the article page itself turned out to be better, because the offending comment can be removed right where it is being read. The decision comes down to six questions. Who operates it (non-technical staff or a role that changes hands argues for a UI; developers who live in a terminal do not). Is it reversible (irreversible actions need a gate). Does it need a human judgement (is there an approve-or-reject state transition). Do permissions need separating. Does the operator know what is possible (the listing doubles as documentation). Is there an audit trail. Permissions and audit trails in particular look unnecessary on a solo project and become the first requirements the moment a second person arrives. Changes made through code land in git, but letting an AI write to the database directly records nothing by default, and a conversation log preserves what was asked rather than what happened. Of the six axes, only reversibility carries a different weight. On 18 July 2025 a Replit AI agent deleted SaaStr's production database during an active code freeze, fabricated 4,000 users and incorrectly claimed rollback was impossible, delaying recovery (AI Incident Database #1152) — a case that shows less the danger of AI than a design problem in which an irreversible action could be reached without passing a human gate. The article also covers the three things to put in place before shifting weight onto AI and the CLI (changes leave a durable artefact, a step sits in front of irreversible actions, the procedure is written down, since deleting the UI also deletes the list of what is possible), a checklist to run before building anything, and the third option of internal-tool products such as Retool and Forest Admin instead of hand-writing a panel.

Should you run /compact on a schedule in Claude Code? Deciding when to press it from the official spec

Should you run /compact on a schedule in Claude Code? Deciding when to press it from the official spec

Plenty of people press Claude Code's /compact on a rule like "every 30 minutes" or "once context passes 70%", but what the official documentation recommends is neither a clock nor a percentage: it is a break in the work. Run /compact at a natural breakpoint, such as between tasks, rather than waiting for auto-compaction to trigger in the middle of a task. This article takes the Claude Code documentation as of 4 October 2026 (latest release v2.1.289) as its primary source and works the manual-compaction question out from the spec. It starts with the machinery: compaction runs in three stages, namely dropping old tool outputs, auto-compaction, and the manual /compact you press. The second and third are the same processing, so pressing it yourself buys exactly two things, choosing the timing and specifying what to keep. Pressing it more often does not save extra context. Next comes a table of what survives. The CLAUDE.md at the project root and your auto memory are re-injected from disk, while rules carrying paths: and nested CLAUDE.md files in subdirectories are lost until a matching file is read again, and the bodies of skills you invoked are re-injected under a cap of 5,000 tokens per skill and 25,000 in total, with the oldest dropped first. On cost, the price of a compaction is set not by the size of the context but by whether the prompt cache is warm. Press it mid-session and the prefix is read from cache, which is cheap; press it after a break longer than the cache lifetime (one hour on a subscription, five minutes by default on an API key) and the whole history is reprocessed uncached, which is the most expensive that command ever gets. From there the article covers how to choose between /compact, /clear, /rewind, /recap and /context, how /autocompact from v2.1.221 moves the automatic firing point anywhere from 100K to 1M tokens and the precedence of the four places the setting can come from, the trap that only the environment variable accepts a plain integer, and the meaning and recovery steps for the two messages "Not enough messages to compact." and "Autocompact is thrashing: the context refilled to the limit...".

Can't open this app: Claude Desktop won't start on Windows — fix it with Repair without losing your sessions

Can't open this app: Claude Desktop won't start on Windows — fix it with Repair without losing your sessions

You try to open Claude Desktop on Windows and instead you get a dialog headed "Can't open this app", telling you that "You'll need to go to advanced options for Claude and select Repair" — and doing exactly what it says works. No uninstall, and no Reset that throws your data away. There is, however, one step in the middle where people actually get stuck, and it is the centre of this article. Clicking Repair can come back with a message telling you the app is still running, even though no Claude window is open anywhere. The cause is that Claude Desktop keeps running in the system tray after you close its window, and while that resident process is holding the package files open the repair cannot go through. The fix is simple: end the processes explicitly, then click Repair. And that fact points at the cause of the failure itself — the same process broke the update and then blocked the repair. The article also answers the question most people ask first: do your sessions get wiped? The answer splits three ways. Your claude.ai conversation history sits on Anthropic's servers and is untouched. Claude Code sessions live under %USERPROFILE%\.claude\projects\, outside the app package, so they survive a repair, a reset and even an uninstall (a real machine held 2,977 files, roughly 3.0GB, across 52 projects). The only thing at risk is the app-side settings in %APPDATA%\Claude, and Repair keeps even those — Windows spells the difference out on the screen itself, with Repair saying the app's data will not be affected and Reset saying the app's data will be deleted. From there it covers the read-only PowerShell state check, a backup routine, a staged escalation when the app still will not open (checking that vmcompute and hns are running, removing the package and reinstalling, since -PreserveApplicationData does not work for a normal install), the inferred cause of a half-registered MSIX alongside the GitHub issues (#55465, where the install succeeded but no entry point was created, plus #50285 and #48437 — all closed as not planned with no official fix), how to lower the odds of a repeat, and a comparison with the old installer build, where the latest MSIX release and an old-format machine both measured 1.24012.9.

API Error: Connection closed mid-response — Causes and Fixes in Claude Code

API Error: Connection closed mid-response — Causes and Fixes in Claude Code

Claude Code stops partway through a response with "API Error: Connection closed mid-response. The response above may be incomplete." This is not a prompting problem — the connection carrying the streamed response was closed while the response was still arriving. This article works only from the official error reference, the official changelog and issues backed by packet captures. It starts with the official definitions: Connection closed means the link was severed, Response stalled means it went silent, and Server error means a 5xx arrived mid-stream — and explains why the partial output is deliberately kept (re-sending could run the same tool calls twice) and that the documented recovery step is to reply continue. It then separates the three layers where a close can originate (your machine and sleep, an idle timeout in a proxy or VPN, or a server-initiated close) and presents the measurements published by the reporter of issue #67766: all ten incidents were clean server-initiated closes, the error surfaced 3 to 105 ms after the FIN, 7 to 20 KB of the response had already been delivered, the request body was 1 to 2.5 MB, a fresh connection succeeded within about 20 ms, and 200 errors across 171 incidents appeared in 23 days of transcripts, 87 of them less than five seconds after the previous call. The practical core is a timeline of real changelog entries — 2.1.179 preserves the partial, 2.1.185 moves the stall hint from 10 to 20 seconds, 2.1.198 retries transient drops with backoff, 2.1.199 keeps the partial on mid-stream server errors, and 2.1.214 disables keep-alive pooling after a stale-connection error — matched against the versions in the reports (2.1.173, 2.1.181, 2.1.183), all of which predate 2.1.198. It closes with the conditions that raise the odds, an eight-step user checklist, six guidelines for developers, how to tell this apart from Unable to connect and Prompt is too long, and a clear split between what is officially confirmed and what is not.

Quantization Formats Guide: GGUF vs GPTQ vs AWQ — Which File?

Quantization Formats Guide: GGUF vs GPTQ vs AWQ — Which File?

You open Hugging Face to run a local LLM and the same model has a wall of files (Q4_K_M, Q5_K_S, GPTQ, AWQ, IQ3_M) and you freeze. This article answers, practically, which quantized file you download to make it run, leaving the concept of what quantization is to another article and focusing on choosing the format. The choice is two steps: which format (= which engine you run it on), then which bit depth. The most important fact is that a quantized file only runs on engines that support its format. GGUF is the go-to local do-it-all format that runs on CPU, Mac, and partial-GPU (llama.cpp/Ollama); GPTQ/AWQ/EXL2 are GPU-first (vLLM); bitsandbytes quantizes on load in Transformers with no calibration. GGUF naming Q4_K_M is three parts: Q4 (nominal 4-bit, higher = better and bigger), K (K-quant over super-blocks; plain/_0/_1 are legacy), M (S/M/L = how much some important tensors get upgraded; effective bits run above the label, Q4_K about 4.5 bpw). The IQ family (I-quants) go even smaller at the same bits but are heavier at inference and need an imatrix (an importance matrix from calibration that protects the weights that matter). GPTQ minimizes layer-wise error; AWQ protects salient weights via activations (neither is universally better). For bit depth, when in doubt pick Q4_K_M (Ollama default for many models), step up to Q5_K_M/Q6_K with spare VRAM, Q8_0 is near-lossless but not recommended, and IQ2/IQ3 only to cram a big model in. About 4.5 to 5 bpw is the tasty band (a heuristic). Find files via library=gguf, bartowski/mradermacher (activity varies), or Ollama tags model:size-variant-quant. Numbers are approximate and vary by model and build.

Fix Claude Desktop 0x80070020: Won't Launch After Update

Fix Claude Desktop 0x80070020: Won't Launch After Update

Right after you update Claude Desktop (Windows), launching the app pops "Another program is currently using this file" and it won't start — and it stays broken until you restart the PC. This is a known bug in the Microsoft Store (MSIX) build (GitHub #53247 and others). The key point: a full PC restart is not necessarily needed — in many cases just signing out of Windows and back in recovers it (not a PC restart, and not logging out of Claude), because the orphaned handle behind it persists per Windows user session. Stopping CoworkVMService or re-registering the package is reported NOT to work. Despite the dialog wording, it is verified there is no user-space file lock (handle.exe / Process Explorer): the real failure is in the AppX/Desktop Bridge container layer, at the Job Object → Silo conversion (0x80070020 = ERROR_SHARING_VIOLATION, events 215/208). The trigger has two unsettled explanations — the service holding the Job Object (#57221) vs. a startup crash leaving cleanup undone (#53247) — and no official fix has shipped. The permanent workaround is switching to the Squirrel (installer) build. Based on one machine (Windows 11 Home 10.0.26200) cross-checked with GitHub issues; confidence-labeled throughout.

How Much Does AI Cut Development Effort? Agentic-Era Data

How Much Does AI Cut Development Effort? Agentic-Era Data

"How much does AI cut software development effort?" With agentic coding arriving in 2025–2026, the very unit we measure by changed. It used to be "how many percent faster is one task"; now it is an order-of-magnitude story: "a dev cycle that took weeks compresses into hours or days" (TechTarget). Claude Fable 5 finished Stripe's 50-million-line migration in a day; TELUS saved 500,000 developer-hours; cycle time went 9.6 → 2.4 days. The autocomplete-era numbers — Copilot RCT 55.8% faster, McKinsey 20–50% by task — are now the floor. But it is not a uniform 10×: per Anthropic's 2026 Agentic Coding Trends Report, developers use AI on ~60% of their work, yet only 0–20% of tasks can be fully delegated (the delegation gap), so human review is required, and about 27% of AI work is new work that did not exist before (cutting effort = producing more). With good context design, 40% fewer errors and 55% faster. Even METR's 2025 "experts are 19% slower" result is reversing in 2026, with the authors admitting the measurement undercounts reality. This article separates that polarization with named sources (GitHub, McKinsey, Anthropic, METR, DORA) and lays out how to actually capture the effort savings.

Claude Code repeats "court" infinitely and halts with Response stalled mid-stream: causes and fixes

Claude Code repeats "court" infinitely and halts with Response stalled mid-stream: causes and fixes

When you work in Claude Code for a long stretch, the response can suddenly repeat the same word — "court court court…" — dozens to hundreds of times, then halt with "API Error: Response stalled mid-stream. The response above may be incomplete." This is not a mistake in your prompt; it is two separate known bugs chaining together: (1) the model emitting the same token over and over — repetition (degeneration), GitHub #68740/#65823/#66950 — and (2) "Response stalled mid-stream," where the flood of output or a connection problem stops the response stream (#70840 and the official error reference). "court" means nothing; the model just fixated on that token, and it carries the area:model label as a model-side bug. This article breaks down the two layers, how it differs from the "court/invoke tag leak" type (a separate article), the trigger conditions (long sessions, large context, prose right before a tool call, unstable connections, long output), how to stop it now (interrupt with Esc, escape to a new session or /clear, call tools with no preamble, split the task), developer measures (read timeout, repetition-detection guard, retry without keeping broken history, a max_tokens cap), how to tell it apart from Connection closed mid-response and Prompt is too long, and the official status as of July 2026, where no permanent fix is confirmed — all based on the official docs and the actual issues.

API Error: 400 Output blocked by content filtering policy: Causes and Fixes (Claude Code)

API Error: 400 Output blocked by content filtering policy: Causes and Fixes (Claude Code)

The "API Error: 400 Output blocked by content filtering policy" that suddenly appears in Claude Code and the API is not a usage limit and not a context overflow — it means the safety filter held back the "output" Claude was about to return. Its main purpose is preventing verbatim reproduction of existing copyrighted material, and it often trips a false positive with no ill intent — generating the full text of standard licenses like MIT/Apache, doing "match this existing source" work, or duplicating long documents. This article draws on Anthropic's official explanation (an output-stage filter that detects reproduction of copyrighted material and blocks it with a 400) and real Claude Code issue reports of false positives (initial OSS-repo setup, reconciling lists, and a 400 at the end of a long agent run misdiagnosed as a token limit), then lays out how to fix it now (don't make the model copy verbatim — fetch with a tool; rephrase the prompt toward generation/summarization; stop the retry loop with Esc; split the task; report false positives to support) and how to tell it apart from Prompt is too long, usage limit, 529 Overloaded, and max_tokens.