AI Guides

3 Claude Commands to Manage Your Sessions

Did you know the longer you chat with Claude, the dumber it gets? There are a few one-word fixes most people never type, and each takes two seconds.

Facepalm moment when you realize you've been fighting a clogged context window
That feeling when you realize the fix was one slash command away.

Why this matters

Claude Code has a limited context window. Think of it as working memory: everything in your current session lives there. The longer the conversation runs, the more clogged it gets. Claude slows down, forgets earlier details, and starts giving you answers that feel off.

You can see it in the status bar. As the context window fills up, performance drops. It's not that Claude got worse. Your session just got heavy.

Claude Code context window usage in the status bar
The context window shows how much of Claude's working memory your session is using.

Key insight: Claude doesn't actually get dumber. Your context just gets heavy, and these three commands keep it light.

Three commands that keep Claude sharp

1. /clear when you start a new task

When you finish one task and move to another, type /clear. It wipes the current context and gives Claude a blank slate. The old conversation isn't gone. You can jump back anytime with /resume.

Use this between unrelated tasks. Finished debugging auth? Cleared. Now you're writing a marketing email? Start fresh instead of dragging 40 minutes of code errors into a copywriting session.

Typing /clear in Claude Code
Type /clear when you're done with a task and ready for something new.

2. /compact when you're deep in a long task

When you're mid-task and Claude starts feeling sluggish, but you're not done yet, type /compact. It summarizes everything so far and keeps going from that summary instead of the full pile of messages.

You can even point it: /compact focus on the auth bug. That tells Claude what to preserve and what to trim. Useful when you've been iterating for an hour and only the last few decisions actually matter.

The /compact command with its tooltip: free up context by summarizing the conversation
Compact summarizes your session so Claude can keep going without the full history.

3. /model to match the model to the job (and save money)

You don't need the smartest model for everything. I use Opus to plan a complex task, then switch to Sonnet to build, organize files, or manage GitHub. Type /model and pick.

Opus is great for hard thinking. Sonnet is fast and cheap for execution. Switching mid-session means you're not burning premium tokens on tasks that don't need them.

The /model command: set the model for this session
Type /model to switch between Opus, Sonnet, and other models mid-session.

When to use which

  • New task, unrelated to what you were doing? /clear
  • Same task, but the session is getting long and slow? /compact
  • Planning is done, now you're executing? /model (Opus → Sonnet)

That's it. Three commands, two seconds each, and Claude stays sharp instead of drowning in its own history.

The realization that context management was the problem all along
Not dumber. Just heavy.

Here are some related guides to check out:

  1. 5 Claude Code Commands to Stop Burning Money on Tokens
  2. 5 Advanced Claude Code Commands for Daily Power Users
  3. 5 Underrated Claude Code Commands for Everyday Use
  4. How to Stop Hitting Claude Usage Limits (part 1)
  5. How to Setup Claude Code (5-Min Guide for Non-Techies)