Claude Code's Secret Weapon: How the /btw Command Saves Tokens and Keeps You in Flow

Claude Code's Secret Weapon: How the /btw Command Saves Tokens and Keeps You in Flow

Use the /btw command to ask quick, contextual questions without resetting your main task's conversation, saving tokens and preventing workflow interruptions.

4h ago·3 min read·2 views·via medium_claude, hn_claude_code, reddit_claude
Share:

What Changed — The /btw Command

Anthropic quietly released a powerful, undocumented feature in Claude Code: the /btw command. This isn't a standard slash command like /fix or /explain. Instead, it's a conversational modifier you can append to any message.

When you type a question followed by /btw, Claude Code treats it as a side conversation. It answers your immediate question without resetting the context of your primary task. The model understands that this is a "by the way" inquiry—something separate from your main workstream.

What It Means For You — Concrete Impact

This solves two major pain points for daily Claude Code users:

  1. Token Waste Elimination: Previously, asking a quick clarifying question mid-task would add to your main conversation's token count, potentially pushing you closer to context window limits. With /btw, these side questions exist in a separate conversational thread that doesn't bloat your primary task's context.

  2. Workflow Preservation: No more breaking your flow to open a new chat or restart a conversation. You can ask about a library function, request a syntax example, or clarify a requirement without derailing the complex refactoring or feature implementation you're working on.

How It Works — The Technical Magic

The /btw command leverages Claude Code's underlying conversational architecture to create a temporary "branch" in the dialogue. When you use it, Claude:

  • Maintains full memory of your main task's context
  • Processes your /btw question with access to that context
  • Returns an answer specifically for that question
  • Then seamlessly returns to your main task where you left off

This is different from starting a new chat because your /btw question has access to all the files, recent changes, and conversation history of your current session.

Try It Now — Real Examples

Here are specific ways to use /btw in your daily work:

During a refactor:

I'm refactoring this authentication middleware to use JWT. /btw What's the current best practice for JWT secret rotation in Node.js?

While debugging:

This React component is re-rendering too often. /btw Show me the React DevTools profiler output interpretation for this scenario.

During implementation:

Implementing the payment webhook handler. /btw What status code should I return for duplicate webhook events from Stripe?

Key syntax notes:

  • Place /btw at the END of your message
  • It works with both typed messages and voice commands
  • You can chain multiple /btw questions in a session
  • The command is silent—it won't appear in your conversation history

Pro Tips for Maximum Efficiency

  1. Combine with file context: Since /btw questions have access to your open files, you can ask questions like "/btw How would I test this specific function in line 45 of auth.js?"

  2. Use for quick validations: Before implementing a complex solution, ask "/btw Is there a simpler approach to this problem?" without committing to changing direction.

  3. Leverage for learning: When Claude suggests a library or pattern you're unfamiliar with, immediately ask "/btw Give me a 2-minute explanation of how X works."

  4. Avoid overuse: While /btw is efficient, asking too many unrelated questions in succession can still create cognitive overhead. Use it for truly tangential questions, not core task questions.

The /btw command represents a shift toward more natural, conversational coding assistance. It acknowledges that developers think in tangents and context switches, and provides a structured way to handle those without breaking the primary work in progress.

AI Analysis

Claude Code users should immediately start incorporating `/btw` into their daily workflow. The most significant change is mental: stop treating every question as part of your main task thread. When you encounter something you need to look up or clarify, append `/btw` instead of asking directly. This preserves your main conversation's token budget for the actual work. For example, if you're implementing a feature and realize you need to understand a specific API, ask about it with `/btw` rather than asking in the main thread. Also, use `/btw` for validation questions. Before spending 20 minutes implementing a solution Claude suggested, ask "/btw Are there any edge cases I'm missing with this approach?" This can save significant rework time. The command is particularly valuable during code reviews and debugging sessions where you frequently need to ask clarifying questions without losing your place in the analysis.

Trending Now

More in Products & Launches

Browse more AI articles