Skip to content
AI Tools

Claude AI Guide: Tips, Tutorials & Best Practices

Comprehensive guide to Anthropic's Claude AI. Learn how to use Chat, Cowork, and Code modes with practical tips and tutorials.

75 articles

Sort articles to find what you need

Articles in Claude

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, reinstalling with -PreserveApplicationData), 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.

Claude Opus 5 Released: How It Compares to Opus 4.8 and Fable 5

Claude Opus 5 Released: How It Compares to Opus 4.8 and Fable 5

Anthropic released Claude Opus 5 on July 24, 2026, and its own documentation calls it a step-change rather than an incremental improvement over Opus 4.8 — yet the price does not move: $5 input / $25 output per million tokens, exactly half the flagship Fable 5 ($10 / $50). This article cross-checks the official announcement and documentation against several reports and lays out the core specs (claude-opus-5, a 1M context that is both default and max, 128K max output, knowledge cutoff May 2026), pricing including cache rates and fast mode (about 2.5x speed at 2x price, Claude API only), the benchmarks (Anthropic states in its own text that Frontier-Bench is more than double Opus 4.8, CursorBench 3.2 lands within 0.5% of Fable 5, ARC-AGI 3 is three times the runner-up, and OSWorld 2.0 beats Fable 5 at roughly a third of the cost; press-sourced figures read off the charts include Frontier-Bench 43.3%, ARC-AGI-3 30.2%, GDPval-AA 1,861 and OSWorld 70.6%), and the places it still loses (68.8% against GPT-5.6 Sol at 72.7% on DeepSWE v1.1, offensive security and long-horizon biology research where Mythos 5 leads, and settings where max effort scores below lower ones). It then covers the two breaking API changes (thinking is on by default, so tight max_tokens budgets get truncated; disabling thinking is only allowed at effort high or below, and xhigh or max returns a 400), how to pick among the five effort levels, new features such as mid-conversation tool changes, a 512-token cache minimum and default fallback mode, the personality shift toward longer answers, more narration, more delegation and unprompted self-verification — with the migration rule that you remove prompt text rather than add it — and finally who should migrate now, plus a six-step migration checklist.

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 only local do-it-all format that runs on CPU, Mac, and partial-GPU (llama.cpp/Ollama); GPTQ/AWQ/EXL2 are GPU-first (vLLM/TGI); 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.

Choosing Not to Use AI: The Judgment to Deliberately Skip It

Choosing Not to Use AI: The Judgment to Deliberately Skip It

Now that "just ask the AI" and "let the AI write all of it" are the default, the opposite question has an edge: is this actually a situation where I should use AI? This article is not anti-AI; it is about keeping "do not use it" as an option precisely so you can get the most out of AI. AI is not something you use by default but a tool you choose on purpose, and using it well and choosing not to are a matched pair. Six situations where skipping it wins: 1. learning that builds fundamentals (the writing-to-think process is the goal), 2. entering confidential or personal data (do not paste without checking terms and retention), 3. fatal-if-wrong final calls (medicine, law, safety, money should not be delegated unverified), 4. light tasks not worth the cost, 5. work where human trust or creativity is the core (apologies, hiring, authorship), 6. when you do not want to add a single point of failure (business continuity). Decide fast with three questions: can you verify the output yourself, is it only data that is ok to share, and is the process something you should be training on right now. If you can verify it, the data is shareable, and you do not need to train, use AI; otherwise skip it or insert a human check. The downsides of over-use (cognitive offloading, accepting plausible errors, dependence) are presented as points of discussion, not hard numbers. Deliberately skipping AI is not a brake but the flip-side skill that lets you go all-in where it fits, and a hedge against over-depending on AI.

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.

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.

GPT-5.6 Sol vs Claude Fable 5 In-Depth Comparison — Benchmarks, Long-Running Autonomy, Price & How to Choose

GPT-5.6 Sol vs Claude Fable 5 In-Depth Comparison — Benchmarks, Long-Running Autonomy, Price & How to Choose

An in-depth comparison of OpenAI's flagship GPT-5.6 Sol (July 9) and Claude Fable 5 (June 9), which Anthropic positions as "the most powerful model it has ever made generally available." Where the Opus 4.8 matchup was a head-to-head in the same price tier, this one turns on a cost-versus-capability trade-off: "the half-price all-rounder Sol ($5/$30)" against "the twice-as-expensive but top-tier Fable 5 ($10/$50)." On production-grade coding's SWE-Bench Pro, Fable 5's 80.3% pulls more than 15 points ahead of Sol's 64.6% (estimated) — a gap wider than in the Opus 4.8 matchup. Fable 5 also self-drives for up to 12 continuous hours while focusing on millions of tokens, with Stripe finishing a 50-million-line Ruby migration in a single day as its home-turf "follow-through." Sol, meanwhile, leads on terminal operation (TerminalBench 2.1 88.8% vs Fable 86.0%), Agents' Last Exam (53.6 vs 40.5), and Coding Agent Index (80 vs 77.2), plus best value with half the price and +54% token efficiency. This article covers the spec cheat sheet, benchmark details, the "undisclosed-benchmark problem" of OpenAI withholding Sol's SWE-bench Pro, long-running autonomy, real cost (viewed per completed task), a strengths-and-weaknesses map, and how to choose by use case — all grounded in official and independent benchmarks.

GPT-5.6 Sol vs Claude Opus 4.8: In-Depth Comparison of Benchmarks, Coding, Price, and How to Choose

GPT-5.6 Sol vs Claude Opus 4.8: In-Depth Comparison of Benchmarks, Coding, Price, and How to Choose

An in-depth comparison of 2026's two AI-coding giants, Claude Opus 4.8 (May 28) and GPT-5.6's top-tier Sol (July 9). Their strengths are almost opposite: Sol leads in terminal operation and overall agentic capability (TerminalBench 2.1 88.8% vs Opus 78.9%, Agents' Last Exam 53.6, Coding Agent Index 80), while Opus 4.8 leads in production-grade coding, math, and long context (SWE-bench Pro 69.2% vs Sol 64.6%, USAMO 2026 96.7%, GraphWalks 1M 68.1%) and foregrounds honesty (overconfidence cut to one-tenth, 0% uncritical reporting of flawed results). OpenAI also leaves many of Sol's benchmarks undisclosed (SWE-bench Pro, GPQA, AIME, MMLU), so in coding's heartland the disclosed Opus has the edge. We cover the spec table, benchmark details, the undisclosed-benchmark problem, real cost ($25 vs $30 unit price vs +54% token efficiency), a strengths/weaknesses map, use-case picks, and a dual-vendor strategy.

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.

Does Claude Code's Weekly Limit Really Reset Every 7 Days? Investigating Early Recovery (July 2026)

Does Claude Code's Weekly Limit Really Reset Every 7 Days? Investigating Early Recovery (July 2026)

You hit Claude Code's weekly token limit, yet the allowance fully replenished before seven days passed — more than once. Online there are even "hidden-mechanism" write-ups claiming the weekly limit resets every 72 hours. Is that true? This article traces the phenomenon to primary sources. But Anthropic has not documented the internal reset mechanism, and the limits keep changing, so we clearly label three kinds of information: facts confirmable from official sources, events multiple users reproducibly observe but that Anthropic never addressed, and single-source unconfirmed speculation. The core: early full recovery is, in most cases, Anthropic's irregular global resets (announced repeatedly by @ClaudeDevs); the displayed reset time is also demonstrably unstable; and the circulating "72-hour cadence" is single-observer, unreproduced, and contradicted by another observation (24h), so it cannot be taken as fact. Where something can't be stated, we say so — a July 2026 investigation.

What Is the Claude Code Sandbox? Filesystem & Network Isolation for Safe Automation (2026)

What Is the Claude Code Sandbox? Filesystem & Network Isolation for Safe Automation (2026)

Use Claude Code long enough and you hit a dilemma: a prompt on every command stalls your flow, yet turning them all off with bypass is dangerous. The sandbox breaks that binary by fencing what can be touched at the OS level, so commands run freely inside without prompts while nothing reaches outside. This guide covers the two isolations (filesystem and network), getting started with /sandbox (macOS works out of the box, Linux/WSL2 needs bubblewrap+socat, native Windows is unsupported), auto-allow vs regular mode, configuring settings.json (allowWrite/denyRead, credentials, allowedDomains), how it complements permission modes and rules as a third OS-enforced layer, its limits (un-inspected TLS, Unix sockets), and when to reach for dev containers or VMs. Anthropic reports it cut permission prompts by 84% in internal use.