Claude Code shortcuts Plan Mode users should know: Shift+Tab and daily commands
MarkdownUse this Claude Code shortcuts cheat sheet for Shift+Tab, Esc Esc, /compact and /cost. Claude Code shortcuts and commands help manage modes, context and usage.
Read full article
For additional instructions on working with Ailoot, see the documentation.
Which shortcuts and commands does this Claude Code guide cover?
Key takeaways
This is not a “top Claude Code features” list or a retelling of the Anthropic docs. These are 11 techniques from six months of daily work: 5 tactical (shortcuts, flags, /commands) and 6 strategic (how to break down a plan, how to manage 5 windows, how to catch blind spots). One evening is enough to establish 11 habits.
With vibe coding, the question is no longer “does Claude Code work?” - the question is “how do you work with it so it doesn't burn through your limits or hallucinate?” My 9 previous guides cover the concepts: CLAUDE.md, Plan Mode, context engineering, Skills, Subagents, MCP, /rewind, limits, second brain. This one is a collection of tactics to go with them.
Each tip solves one headache. You can read them in order or jump to the most pressing ones: for shortcuts, go straight to tip 1; for saving tokens, tips 4 and 5; for parallel work, tip 6; for the author's techniques, tips 8-11.
I'm writing for people who have already installed Claude Code and spent at least a week using it. If you're just installing it, start with the CLAUDE.md guide, then come back.
How to switch Claude Code modes: the Shift+Tab shortcut
Key takeaways
Shift+Tab cycles through permission modes: default, acceptEdits, plan, and any enabled modes (auto, bypassPermissions). Before a complex task, cycle to Plan Mode and check the mode indicator before sending the task. Before routine work, select acceptEdits and verify that label; the number of presses depends on your starting mode and enabled modes.
The most common beginner mistake is staying in default all day and manually approving every change. After an hour, this gets exhausting, and you're tempted to run --dangerously-skip-permissions (more on that at the end of the tip). Shift+Tab is the middle ground: you choose when you need acceptEdits and when you need plan.
Here's the specific rule I follow when switching:
- Starting a complex task - use Shift+Tab until the mode indicator shows
plan. Claude thinks it through and drafts a plan; it doesn't write code until I approve. - Plan approved, moving to implementation - cycle until the mode indicator shows
acceptEdits. Claude edits files without asking for approval, but still prompts for Bash commands. - Routine edits (rename, trivial refactoring) - go straight to
acceptEdits, no plan. - Danger zone (database migrations, deleting files) - I return to
defaultwith Shift+Tab.
# Common permission modes (check the active label, not a fixed press count):
# default - standard permission prompts
# acceptEdits - file edits are accepted; other tool permissions still apply
# plan - investigate and plan before implementation
# Additional modes depend on your version, settings, and organization policy.
If Shift+Tab doesn't work in your version of Claude Code (claude --version), check that you have the latest version. The /doctor command will show you everything about the installation.
Shift+Tab cycles through permission modes. The available modes depend on what you've enabled in settings.
How to undo the last action without losing context: Esc Esc
Key takeaways
Double Esc is a quick way to undo Claude's last action without a full /rewind. If the input field is empty, the checkpoint menu opens. If there's something in the field, it clears it but saves it in history (the up arrow brings it back). This addresses the fear of “I broke it and can't undo it” in 80% of cases; you don't need to go to git.
Esc and Esc Esc do different things, which is why people mix them up:
- One Esc - interrupts Claude in the moment, while it's doing something. Everything it has managed to do remains. Useful when it's gone in the wrong direction and you want to redirect it.
- Double Esc Esc - if the input field is empty, opens the checkpoint menu (restore code, restore conversation, or both, or summarize). If there's text in the field, it clears the field and puts the text in history (the up arrow brings it back).
# From the Esc Esc menu with an empty field:
# 1. Restore code only - restore the files, leave the conversation
# 2. Restore conversation only - restore the conversation, leave the files
# 3. Restore code and conversation - restore both (the most common choice)
# 4. Summarize from here - summarize the conversation from this point
# 5. Summarize up to here - summarize up to this point
Checkpoints are created automatically for every prompt you send - there's nothing to remember, and you can always go back. For the full breakdown, see the guide to /rewind, which also covers the git combination for deep rollbacks.
Each user prompt creates a new checkpoint. Checkpoints are saved between sessions, so you can return to them in resumed conversations.
Esc Esc is one of the first techniques for beginners. Once they stop being afraid that they'll “break it and won't be able to undo it,” they start experimenting more boldly, and the results improve many times over.
When should you use /compact instead of /clear?
Key takeaways
/clear completely resets the session, leaving a clean context window. /compact [hint] has the LLM compress the conversation history into a summary, preserving the meaning of the previous work. The rule is simple: finished the task - /clear. Continuing the same task, but the window is full - /compact. Get them mixed up, and you'll either lose context or hit the limit.
Here's how /compact works internally: Claude takes the entire message history, processes it, and returns a brief summary with the most important details. A useful trick is to give it a hint: /compact keep the coding principles and current plan, discard the CSS discussion. Then the compression will be targeted.
# When to use what:
/clear # finished a feature, moving to a new one
/compact # long session, context is >50% full
/compact keep the architecture and plan # targeted compression with a focus
The signal that it's time for /compact: the /cost command or status bar shows 70%+ of the context window used, and the session is only half over. If you ignore this, Claude will start “forgetting” the beginning of the conversation, and you'll waste time explaining things again.
In Claude Code, for example, we do this by sending the message history to the model to summarize and compress the most important information.
For the full theory of the context window, see the guide to context engineering. It also explains why context is a finite resource with diminishing returns.
How to track tokens in real time: the /cost command
Key takeaways
/cost shows current spending in dollars and tokens. /statusline adds the same information to the status bar - you can always see the model, directory, context percentage, and cost without calling a command. The main way to tackle the fear of “spending it all in one day” is to make spending constantly visible.
The fear of “spending it all in one day” is one of the top concerns among vibe coders. The main way to address that fear is to make spending visible.
/cost # shows current session spending (tokens + $)
/statusline # configures the status bar: model + directory + context % + cost
A simple rule: check /cost every 30-60 minutes. If you've spent less than a couple of dollars in an hour, that's fine. If it's more, something's off: maybe you forgot /compact and the context is growing, maybe you chose the wrong model (more on that in the next tip), or maybe Claude is rereading large files 10 times.
The full guide to saving on limits is “How Not to Burn Through Claude Code Limits in a Day”, with 8 rules. Here, the tactic is making spending visible with /cost and /statusline.
Which Claude model should you choose for a task: Haiku, Sonnet, or Opus?
Key takeaways
The --model flag overrides the model only for the current session. The basic rule: Haiku for scripts and quick edits, Sonnet for routine deep thinking, Opus for architecture and complex debugging. According to public interviews, the Claude Code team itself uses Opus with thinking “for everything,” but that's an option for people paying for a subscription without worrying about tokens. For an entrepreneur, the rule is different: start cheaper, pay more when you need it.
claude --model haiku # ~3× cheaper than sonnet, for routine work
claude --model sonnet # default, balance of price and quality
claude --model opus # ~1.7× more expensive than sonnet, for complex tasks
According to Anthropic's public pricing in May 2026: Haiku $1/$5 per 1M input/output, Sonnet $3/$15, Opus $5/$25. That means Haiku is 3 times cheaper than Sonnet, and Opus is 1.7 times more expensive than Sonnet.
How I choose every day:
| Task | Model | Why |
|---|---|---|
| Rename a variable/function | Haiku | Unambiguous operation; no need to “think” |
| Simple refactoring (extract a function) | Sonnet | Standard, cheap, accurate |
| Add a new feature with architecture | Opus | Deep reasoning is needed |
| Debug a strange bug Sonnet hasn't found in 3 attempts | Opus | Less steering, higher hit rate |
| Read and summarize long logs | Haiku | Simple categorization, cheaper |
The debatable point is whether to use Sonnet and Haiku at all if Opus gets it right “on the first try” on average. My answer: for a non-programmer entrepreneur, Haiku and Sonnet pay off on 70% of tasks. Opus is worth saving for the 30% that are genuinely difficult.
How to run 3-5 tasks in parallel: /resume + git worktrees
Key takeaways
Parallel work in Claude Code relies on 2 things: --resume (continue a named session) and git worktree (a separate directory for each branch). In practice, I have 5-10 Claude windows open at once, each working on its own micro-task. Context doesn't overlap, and tokens aren't wasted on “everything in one window.”
The logic is simple: one long Claude window eats up context. Each request loads everything that was in that window into the model - even if you're discussing something completely different now. 5 short windows for micro-tasks each remember only their own work. In total, you spend less.
# Start a named session for a specific task:
claude --resume "auth-refactor"
claude --resume "homepage-redesign"
claude --resume "db-migration"
# Use a worktree to keep git from overlapping:
git worktree add ../my-project-auth feature/auth
cd ../my-project-auth
claude --resume "auth-refactor"
If you lose track of what's in each window, run claude --resume without an argument to see a list of recent sessions with their names and times. Inside an active session, /agents checks the running subagents.
When I'm working on a feature with a long development cycle, I usually do this:
- Window 1 - plan in
plans/YYYY-MM-DD-feature.md. Discussion only, no code. - Window 2 (following the plan) - implement phase 1. After the phase, update the plan (
[x]). - Window 3 - implement phase 2 in parallel with window 2, if the phases don't overlap.
- Window 4 - a synthesis agent checks the results from both windows.
- Window 5 - a security review after merging (see tip 8).
When not to use worktrees: if you're managing 1-2 projects a day, the overhead of switching between worktree directories will eat into the benefit. Worktrees start to pay off at 3+ parallel tasks per day.
How to avoid hallucinations: file references with @file
Key takeaways
Instead of “look through the project and find auth.ts,” write @src/lib/auth.ts and Claude will load the file directly, without searching. This saves tokens (no need to scan the tree) and removes a source of hallucinations (Claude doesn't have to guess the path; you've given it the path). The same goes for commands: !git status runs without a tool call, and the output goes into context.
File autocomplete starts with the @ symbol. Start typing a path and Claude shows suggestions. You can reference several files at once: @src/lib/auth.ts @src/lib/session.ts @prisma/schema.prisma.
# Prompt without exact paths (bad):
> Look at the auth logic and fix the session bug
# Prompt with @ references (right):
> @src/lib/auth.ts @src/lib/session.ts - fix the bug: after logout the cookie isn't cleared
The second trick in the same group is shell mode using !:
> !git status # runs without calling Claude, output goes into context
> !npm test # same
> !cat /var/log/app.log | tail -50 # same
Why: you don't spend tokens on “Claude, look at git status” - Claude would get the same answer through the tool anyway. ! is shorter and cheaper.
This is related to CLAUDE.md: the main file should be up to 200 lines of project rules. Narrower rules (for example, API conventions) go in .claude/rules/api-design.md with YAML frontmatter paths: ["src/api/**/*.ts"]. Then they're loaded only when Claude edits files in src/api/. For the full breakdown, see the CLAUDE.md guide.
How to avoid losing progress on long tasks: plans with phases and [ ] / [x]
Key takeaways
Any task that takes more than 30 minutes of work needs a plan in a separate file, plans/YYYY-MM-DD-name.md, with phases and checkboxes [ ] / [x]. The plan belongs in a file, not the chat. This lets parallel windows pick up different phases without stepping on each other and makes it easy to see progress rather than “remembering” it from the chat.
Here's the plan file template I use in every project:
# Plan: [feature name]
Creation date: 2026-05-22
Goal: [one sentence on what we want to achieve]
## Phase 1: [short name]
- [ ] Step 1.1: [specific action]
- [ ] Step 1.2: [specific action]
- [ ] Step 1.3: [specific action]
## Phase 2: [short name]
- [ ] Step 2.1
- [ ] Step 2.2
## Outcome
Fill in at the end: fully or partially implemented, and what remains.
The rule is absolute: every agent must update the plan after each session. In other words, as soon as you finish a phase, go to the file and mark it [x]. If you don't, the next window won't know the phase is done and will try to repeat it.
When the plan is in a file, not in your head:
- Parallel windows (see tip 6) can pick up different phases.
- If the task stretches over 3 days, when you return 2 days later, you can see right away where you left off.
- The final check against the actual result is cheap (
grep -c "\[ \]"in the file = number left open).
When not to use it: a 5-minute hotfix, a trivial edit in one file, reading and summarizing a log. Not every action needs a plan.
This technique is part of the Second Brain concept. For the full breakdown of the business/, plans/, ai-clone/ folders, see the guide to the Second Brain.
How to spot in advance where Claude will fail: self-critique with 10 reasons
Key takeaways
Before starting a complex feature, put Claude in adversarial mode: “Imagine the project has failed. A year from now, I've lost time and energy. Name 10 reasons why. Don't spare me; be harsh.” This cuts through early optimism and surfaces blind spots Claude would never point out in “let's implement it” mode.
Here's the prompt framework I use verbatim:
Imagine the idea folder has been put through a methodology where you already think as if the project has completely failed. Name 10 reasons why, a year from now, I will have spent a lot of time and the idea will have turned out to be a failure. Your task is not to spare my feelings, but to be as harsh as possible.
After the 10 reasons - a second round: defend each reason against my counterarguments. Where am I weakest?
Third round: write a plan for what to do so that these problems don't occur.
I run it at three stages:
- The first idea “everything is great” - when I'm sure. Self-critique cuts the idea down by 30-50%.
- Midway through the plan - when I'm already deep into the work and have become blind.
- Before launch - a final filter.
Claude really does challenge you in adversarial mode. GPT-5 in the same situation first praises the idea, then “tries to find improvements.” I noticed this difference after a year of experimenting:
The difference in adversarial mode looks like this for me: ChatGPT says, “Good catch, that's absolutely right.” Claude says in the same situation, “Agreed, that's complete crap; I'll redo it now.” When I need criticism, the second response saves me days of wasted work.
When not to apply it: positive iterations on UI and copywriting. Adversarial mode is out of place there - it will kill creativity.
This technique is known as a project premortem. I adapted it for working with an AI agent: instead of a team of people, you do a pre-mortem with Claude. No one is afraid to say “boss, the project will fail” - and blind spots surface in minutes.
How to do 5 sources of research in the time it takes to do one: parallel subagents
Key takeaways
Before starting work on a feature, launch 5 parallel research agents through subagents. Each focuses on its own area: professional networks, open source, accelerators, competitors, comparisons. They return in 10-20 minutes. Then a separate synthesis agent combines everything into one report. This saves hours and cuts confirmation bias.
Here's the prompt framework:
You already have the full context. Find and conduct deep research; launch 5 parallel subagents.
Subagent 1: go through professional networks - who is solving this problem?
Subagent 2: open-source solutions on GitHub - what is popular?
Subagent 3: startup accelerators - who is attracting
investment in this niche?
Subagent 4: direct competitors' websites - what do they promise and
at what price?
Subagent 5: comparisons and reviews - what do
users say in reviews?
When everyone returns, launch a synthesis agent
that cross-references the 5 reports and produces an outline
for my second-brain folder.
What changes compared with ordinary research:
- Time: 5 simultaneous streams instead of 5 sequential ones. An hour of work in 15 minutes.
- Depth: each agent specializes. One agent's confirmation bias won't infect the others.
- Context: each subagent has its own context, separate from your main context.
For the full guide to subagents, see “Claude Code Subagents in 2026”. It also explains the difference between Skills and MCP - which to use when.
When not to apply it: cosmetic edits, bug fixes, small technical tasks. Research is overkill for anything smaller than “a new feature that takes 1+ day of work.”
How to give Claude tasks from your phone: a Telegram bot in your pocket
Key takeaways
Connect Claude Code to your Telegram bot through the official plugin. On your computer (with sleep disabled), Claude Code runs in a terminal, attached to the project. You can message it from anywhere through the bot: “look at the latest commits,” “what was the revenue from receipts this week,” “read all the support questions from tonight.” The bot replies with the full context of the project - code, commit history, the entire business/ structure. A live agent in your codebase that sees and remembers everything.
How to set it up (4 steps):
- A computer with continuous uptime - I disable sleep in the system settings (macOS: Energy Saver → Prevent computer from sleeping).
- Claude Code running in a terminal, attached to the project folder.
- The official Telegram plugin - add the marketplace with
/plugin marketplace add anthropics/claude-plugins-official, then install/plugin install telegram@claude-plugins-official(the exact steps are updated over time - the latest instructions are in the official plugin repo). - The bot is tied to one session - this is currently a limitation: one bot = one project = one session. If you need a second one, set up a second bot.
What I do with the bot every day:
- I'm out for a walk and get an idea - I send it to the bot right away so I don't forget. The bot adds it to
inbox.mdfor processing later. - A call with a potential client - after the call, I ask the bot: “based on the transcript of the last call, name the 3 main pain points that work in our favor.” A minute later, I have a full analysis in the chat.
- At a café in the morning - “show me the open homework from my list.” No need to open the laptop.
⚠️ A catch: for now, you can't run /clear or /compact from the bot - the bot session is the same as the terminal session, and the context keeps growing. Restarting is only possible manually through the terminal.
For me, this is the most useful Claude Code extension of the past two weeks. It took me from “I work with Claude when I'm sitting at my desk” to “I work with Claude whenever I have a thought.”
What should you put to work first: a 7-day roadmap
Key takeaways
Don't try to implement all 11 tips in one day - you'll burn out and they won't stick. A 7-day roadmap: days 1-2 - shortcuts (1-3), days 3-4 - commands (4-5), days 5-6 - parallel work (6-7), day 7 - planning and pre-mortem (8-9). Parallel subagents and the Telegram bot (10-11) are for week two, once you've got the first 9 down.
| Day | What we implement | How long it takes |
|---|---|---|
| 1 | Shift+Tab + Esc Esc | 30 minutes of practice |
| 2 | Get comfortable with Shift+Tab + Esc Esc | work for half a day |
| 3 | /compact + /cost | 30 minutes + 1-2 work sessions |
| 4 | --model haiku/sonnet/opus | 30 minutes + some experimentation |
| 5 | --resume for named sessions | 30 minutes |
| 6 | git worktrees - if you handle 3+ parallel tasks | 1 hour |
| 7 | Plan in plans/ + the prompt “10 reasons why I'll fail” | 1-2 hours once |
| 8-14 (week two) | Subagents for research + Telegram bot | 3-4 hours to set up and get used to it |
The combination of techniques matters more than any one of them on its own. Shift+Tab without Esc Esc makes experimentation scary. /compact without /cost means you don't know when to compress. Plans in files without parallel windows are a complication without a payoff.
Sources
- Claude Code CLI Reference - code.claude.com
- Claude Code Interactive Mode (shortcuts) - code.claude.com
- Claude Code Slash Commands - code.claude.com
- Claude Code Checkpointing - code.claude.com
- Claude Code Memory & /compact - code.claude.com
- Effective Context Engineering for AI Agents - Anthropic Engineering
- GitHub: anthropics/claude-code (CHANGELOG)
To continue working with models, you can go to Ailoot.
More details
Questions about Claude Code in 2026: 11 Tips, Shortcuts, and Commands
How do I know I am in Plan Mode?
Use Shift+Tab to cycle modes and read the mode indicator before sending the task. Stop when it shows plan; a fixed number of presses is unreliable because the starting mode and enabled modes can differ.
Should I use /clear or /compact when context fills up?
Use /compact when continuing the same task, with a hint about the plan and decisions to preserve. Use /clear when the task is finished and the next task needs a fresh context; keep important progress in the plan file first.