The "32 tricks" listicles make Claude Code look like a moving target. It is — but most of the moves only make sense once you know what the tool actually ships with today.
What Can Claude Code Do as of June 2026?
As of June 2026, Claude Code is a terminal-and-IDE coding agent whose default model for Max, Team Premium, and Enterprise tiers is Opus 4.8, which became the default in Week 22 (May 25–29 2026) . Opus 4.8 carries a 1M-token context window priced at $5/$25 per million input/output tokens; Sonnet 4.6 is the lighter alternative at $3/$15, also with a 1M window .
The other shifts are operational. Auto mode (--permission-mode auto) uses a classifier to block risky actions instead of prompting you on every step; it graduated from research preview (Week 13) to Pro (Week 21) to Bedrock, Vertex, and Foundry (Week 23) . New slash commands landed throughout 2026: /goal (Week 20), /code-review and /usage (Week 21), /cd (Week 24), and an Artifacts beta (Week 25), with MCP login/logout from the shell added in Week 26 (June 22–26) .
Subagents now chain up to five levels deep (Week 24), and dynamic workflows can orchestrate hundreds of subagents to investigate a large codebase without polluting your main conversation . Because the changelog ships near-daily, verify any flag-specific claim against your own claude --version .
The Boxes to Tick Before the Tricks Make Sense

Before any slash command earns its keep, confirm three things: your build is current, your auth resolves the way CI expects, and your repo has a CLAUDE.md worth loading. Native installs auto-update, but Homebrew (brew upgrade claude) and WinGet installs need a manual upgrade — check yours with claude --version.
For automation, auth precedence is fixed and worth memorizing: cloud-provider credentials → ANTHROPIC_AUTH_TOKEN → ANTHROPIC_API_KEY → apiKeyHelper → CLAUDE_CODE_OAUTH_TOKEN → subscription OAuth . Linux stores credentials in ~/.claude/.credentials.json (mode 0600); macOS uses the encrypted Keychain. claude setup-token mints a one-year OAuth token for CI, but requires a Pro, Max, Team, or Enterprise subscription .
Finally, run /init in any repo to scaffold a starter CLAUDE.md. Keep it under 200 lines , applying one litmus test per line: would removing this cause Claude to make a mistake? If not, cut it.
The Moves Worth Drilling: Slash Commands, Hooks, and Subagents

The single distinction that reorganizes every other trick: CLAUDE.md advises, hooks enforce. CLAUDE.md loads at session start as context, not a rule the runtime checks — the model reads it, weighs it, and can deviate. Hooks defined in .claude/settings.json (PreToolUse, Stop, and others) are deterministic shell commands that fire regardless of what the model decides . Put preferences in CLAUDE.md; put hard constraints — "never touch main", "block writes outside src/" — in hooks. You don't have to hand-write the JSON; Claude can generate it for you.
| Mechanism | Nature | Use for |
|---|---|---|
| CLAUDE.md | Advisory context, model may deviate | Style, conventions, preferences |
Hooks (settings.json) | Deterministic, fires every time | Hard constraints, gates, blocks |
One ceiling to design around: Claude Code automatically ends the turn after 8 consecutive Stop-hook firings . If your hook keeps blocking, the turn dies silently at the eighth firing — so build a real loop-exit condition (a passing test, a satisfied /goal) below that line rather than relying on the hook to run forever.
"The context window holds the entire conversation — every message, file read, and command output — and performance degrades as it fills." — Anthropic, Best practices for Claude Code (source: code.claude.com)
Four moves keep that window lean: /clear between unrelated tasks; /compact <instructions> for guided summarization before the window fills; /btw <question> for side questions whose answers never enter history; and cat error.log | claude or claude -p to pipe data straight in without bloating the thread .
Plan before you write. Shift+Tab, /plan, or --permission-mode plan enters read-only exploration; press Ctrl+G to edit the plan in your editor before implementing . The opusplan alias plans with Opus 4.8, then hands off to Sonnet 4.6 for implementation — same output quality, lower token spend .
Scope your rules by placement: ~/.claude/CLAUDE.md (global), ./.claude/CLAUDE.md (team, checked into git), and CLAUDE.local.md (gitignored, private). Use @path imports — recursing up to four hops — to share monorepo rules without duplicating them . Delegate large file reads to subagents in .claude/agents/: each runs in an isolated context window with its own tool allowlist, so investigation results never accumulate in the main conversation.
When a run goes wrong, recovery is cheap. Esc interrupts while preserving the conversation; Esc+Esc or /rewind restores conversation, code, or both from automatic per-prompt checkpoints; and --continue/--resume carries a named session across terminal restarts — treat sessions like branches .
Where Claude Code Trips You Up

The most common failure is treating CLAUDE.md as enforcement. Both CLAUDE.md and auto memory load at session start as context, not hard rules — the model can infer a better path and ignore advisory instructions . If a constraint must hold, put it in a hook in .claude/settings.json, which is deterministic; CLAUDE.md only advises.
A few other edges catch people:
- The Stop-hook ceiling. Claude Code overrides and ends the turn after 8 consecutive Stop-hook blocks . Design Stop hooks with a resolution path or a hand-off before they hit that limit, or the turn ends silently.
- /rewind is not git. Per-prompt checkpoints persist across sessions but get overwritten as the conversation advances . Commit to git before any long unattended run.
- Local models need headroom. Claude Code's injected system prompt alone can exceed 4K tokens, so LM Studio's default 4,000-token window fails immediately — one presenter raised it to ~80,000 before pointing
ANTHROPIC_BASE_URLat the endpoint . - Auto mode is contested. Anthropic frames it as a classifier that blocks risky actions , but independent research questions its reliability on ambiguous prompts — use
--permission-mode defaultwhen consequences are irreversible.
What to Tackle After These Basics
Once context, memory, and verification loops feel routine, the next layer is connecting Claude Code to the world and running it in parallel. Start with MCP servers: claude mcp add now pairs with shell-level claude mcp login/logout, added in Week 26 (June 22–26 2026), so you wire in external data sources instead of pasting their output into the conversation .
From there:
- Artifacts beta (Week 25 ) renders UI output directly from Claude Code, skipping a separate HTML export step.
- Git worktrees with
--worktree,--bg, and--remoteisolate parallel experiments in separate branches with no working-directory conflict — the foundation for real agentic fan-out . - SKILL.md files in
.claude/skills/move multi-step procedures out of CLAUDE.md and load on demand; setdisable-model-invocation: truefor manually triggered, side-effect workflows .
The takeaway: keep CLAUDE.md lean and advisory, push deterministic enforcement into hooks, and let skills, MCP, and worktrees carry the weight as your workflows scale.
Frequently asked questions
What is the difference between CLAUDE.md and hooks in Claude Code?
CLAUDE.md is advisory; hooks are deterministic. CLAUDE.md loads as context at session start, so Claude may follow its guidance or deviate when it infers a better path. Hooks — PreToolUse, Stop, and others defined in .claude/settings.json — are machine-enforced regardless of model behavior . Put hard constraints (block a command, require a passing test) in hooks; keep style preferences and project conventions in CLAUDE.md. One caveat: Claude Code overrides and ends the turn after 8 consecutive Stop-hook blocks .
How do I stop Claude Code from degrading mid-task?
Manage the context window, which is the scarce resource. It holds the entire conversation — every message, file read, and command output — and performance degrades as it fills . Use /clear between unrelated tasks, /compact <instructions> for guided summarization, and delegate large-codebase file reads to subagents so their reads do not pollute the main thread. Pipe data directly with cat error.log | claude or claude -p rather than pasting it into the conversation .
What does /rewind restore, and should I use it instead of git?
No — /rewind is not a git replacement. It restores conversation state, code changes, or both from automatic per-prompt checkpoints that persist across sessions . The limit is that checkpoints are overwritten as the conversation advances, so they are recovery within a working session, not durable version history. Commit to git before any long unattended run; Esc interrupts while preserving context, and Esc+Esc triggers the same restore .
How do I run Claude Code in CI without an interactive session?
Generate a token, then run non-interactively. Run claude setup-token to create a one-year OAuth token, which requires a Pro, Max, Team, or Enterprise plan . Then call claude -p with --output-format json or stream-json --verbose. Scope permissions with --allowedTools/--disallowedTools, cap spend with --max-budget-usd, and limit iterations with --max-turns . Verify flag names against claude --version and the live CLI reference, since the changelog ships near-daily .
What is the cheapest way to run heavy planning in Claude Code?
Use the opusplan alias, which plans with Opus 4.8 then switches to Sonnet 4.6 for implementation to save tokens . Opus 4.8 runs $5/$25 per million input/output tokens versus Sonnet 4.6 at $3/$15, so reserving the pricier model for reasoning and handing implementation to Sonnet cuts the bill . Combine it with /compact to summarize the plan before the hand-off so the implementation model does not re-read the full conversation .