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.

78 articles

Sort articles to find what you need

Articles in Claude

Claude's Dispatch — how your phone drives your own PC, and how safe that is

Claude's Dispatch — how your phone drives your own PC, and how safe that is

Dispatch is the feature where you send an instruction from your phone and Claude carries the work out on your own computer (beta, Pro and Max). It does not run in the cloud; your real machine moves, and that single fact produces both the value and the danger. The official help says you can message Claude from your phone and have it work on your desktop computer, using the same connectors, plugins and file access you have already configured in Cowork, inside what Anthropic frames as one continuous conversation reachable from either device. Running it requires the PC to be awake with the desktop app open, and computer use is supported on macOS and Windows only, with no computer use on Linux. Mechanically it works down three tiers of priority: a connector if one is available, browser navigation if not, and direct screen interaction as a last resort, with screenshots taken along the way to understand the display. The assessment starts after that. The places it stops are designed in: computer use is off by default and enabled under Settings, General; permission is asked for each new application; permanently deleting a file requires explicit permission; and investment and trading platforms and cryptocurrency apps are off-limits by default. But there are places it does not stop. Individual actions inside an already-approved app are not confirmed with you, and the official wording is that Claude clicks, types, and navigates your screen directly, without the permission checks that gate other Cowork tools. The docs add that there is no sandbox between Claude and what is on your screen, and that actions taken in one app can impact other apps. The largest risk is prompt injection, which Anthropic describes in its own words: web content is a primary vector for prompt injection attacks, and a manipulated instruction, an unexpected command, or a phishing link opened in your browser could cascade into actions that are difficult or impossible to undo. Anthropic says it scans model activations to detect such behaviour, but that lowers the odds rather than removing the need for you to draw a line, and the guidance still says to switch to manual approval whenever a task touches sensitive files, accounts or sites. Anthropic names the boundary outright: do not give computer use permission access to sensitive apps such as banking, healthcare and government, and avoid financial accounts, legal documents, medical information and personal data. The article also covers the phone side. What leaks if you lose the handset is not data stored on it but the standing to instruct your PC, plus the contents of the continuing conversation — and the official Dispatch help does not document unpairing or lost-device handling, so the remedies come from the account side instead: terminating the individual session under Settings, Account, Active sessions, logging out of every session from claude.ai (which is not available in the mobile apps and therefore needs a web browser), or simply cutting the PC side by closing the desktop app or letting the machine sleep, which is in fact the fastest because Dispatch needs the PC awake and the app open. It closes by separating Dispatch from computer use as two distinct switches, distinguishing both from Claude Code's agent view (which the official docs also call dispatch), and drawing a practical line: start with work you can take back.

Claude Code's agent view — how sessions run in parallel, and where the isolation leaks

Claude Code's agent view — how sessions run in parallel, and where the isolation leaks

Claude Code's agent view, opened with claude agents, is the feature for starting independent background sessions one after another and managing them from a single screen. The official documentation calls the operation you perform there dispatch, which collides with the separate desktop-app feature of the same name, so the first job is telling them apart. The docs describe agent view as the feature that lets you dispatch and manage many Claude Code sessions from one screen, and it is a research preview requiring v2.1.139 or later. This article sticks to the mechanics and the safety model. The first surprise is that every prompt typed into the input box starts its own new session: type a second one and you get a second session beside the first, not an extra instruction added to it. Further instructions go through the peek panel, opened with Space, which shows the latest output or the question the session is waiting on rather than the whole transcript. The heart of the safety model is isolation by worktree. Before editing any file, a background session moves into an isolated git worktree under .claude/worktrees/, so parallel sessions read the same checkout but each writes to its own — reads shared, writes separated. Anything that would reach the main checkout is cut off by three checks: file edits through Edit, Write and NotebookEdit; command working directories that resolve to the main checkout or that cannot be verified to stay outside it; and attempts to redirect git through git -C, --git-dir, GIT_DIR, GIT_WORK_TREE or a cd placed before the git call. The call is deliberately made on the safe side, refusing what it cannot verify, and the same protection is inherited by every subagent the session spawns. It is not an OS-level wall, though: files outside the repository and the network are out of scope, and PowerShell commands get only the working-directory check. Permissions are not chosen at dispatch time either; they are inherited from that directory's defaultMode, or from a dispatched subagent's frontmatter permissionMode, which means the looser your usual configuration, the more unattended loose-permission sessions you create at once. Three things then leak out of the isolation. Choosing "Yes, don't ask again" saves the rule into the main checkout's .claude/settings.local.json, so it applies in the main checkout and in every other worktree and survives the removal of the worktree it was made in. Deleting a session in agent view deletes the Claude-created worktree with it, so uncommitted work disappears — and Ctrl+X stops on the first press and deletes on the second. And .worktreeinclude copies gitignored files such as .env into every new worktree, multiplying your credentials by the number of sessions you dispatch. On top of that, quota drains in proportion to parallelism (ten agents use it roughly ten times as fast), and sessions run locally, surviving sleep but stopping when the machine shuts down. The article closes by placing agent view among the four official ways to parallelise, alongside subagents, agent teams and dynamic workflows, and gives a concrete routine for before, during and after a dispatch.

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 8 August 2026 (latest release v2.1.226) 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, 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.