Skip to content

Course · Claude Code · Daily workflow

Ask side-questions and reuse commands without breaking flow

The context window - the token budget of conversation, instructions, and tool results the model can see at once - is a resource you watch and spend on purpose; the sessions chapter teaches that discipline in full. Spending it on purpose has a daily edge case most people pay without noticing. You are mid-task - the agent is halfway through a refactor of the payments service, the small TypeScript example this course uses - and a small need surfaces: where does the fee rate live in this repo, again?

The naive move is to ask in the session itself. Now that question and its answer are permanent residents of your context, padding the window with something you will consult once. Do that twenty times a day and every session quietly carries the litter. The moves here - /btw, /recap, and history search, all documented in the interactive-mode reference - handle those interruptions without polluting the context or losing the plot.

/btw is built for exactly that interruption: a side question that sees your whole conversation but never joins it. The question and its answer appear in a dismissible overlay and never enter the conversation history. An illustrative exchange, grounded in the payments example’s code:

> /btw where does the fee rate live?
⎿ FEE_RATE = 0.029, defined near the top of src/payments/processor.ts.
processPayment computes amount * FEE_RATE and adds it to the total.

Three properties make it the right tool for the job:

  • It sees everything, and none of it sticks. The answer draws on what is already in context - files the agent read, decisions made earlier in the session - so you can ask about work in progress. When you dismiss the overlay, the window is unchanged.
  • It works while Claude is busy. You can run /btw mid-response; the side question runs independently and does not interrupt the main turn, and it sees everything in the conversation so far except the reply still being written.
  • It has no tools. A side question answers only from context - no reading files, no running commands. That makes it the exact inverse of a subagent (a separate worker with its own context window that reports back a summary; the subagents chapter covers them): /btw sees your whole conversation but has no tools; a subagent has full tools but starts from a blank slate. Ask /btw about what Claude already knows; send a subagent to find out something new.

Run /btw with no question and it reopens your most recent exchange. Two different counts govern what you see and what the answer can draw on, and they are worth keeping apart. Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones - that list is display, and it is five entries long. Separately, with each new ask Claude Code replays the newest 20 earlier exchanges as context for the answer, until you clear them - that is the working set the reply draws on, not the list on screen. Press x to clear the earlier exchanges, and they are gone when you exit Claude Code. If a side question turns out to deserve real work, press f in the overlay (local sessions only) to fork the question and answer into a background subagent with full tool access, or dismiss the overlay and start a subagent or a fresh session properly; /btw itself stays ephemeral, single-response, and toolless by design.

The companion problem is coming back. You stepped away while a long run finished; you are resuming after lunch and the scrollback is a wall. Claude Code shows a one-line recap automatically when you return - generated in the background once at least three minutes have passed since the last completed turn, the terminal was unfocused, and the session has at least three turns. /recap produces the same thing on demand.

That is worth being precise about: both forms are one-line summaries, and both are capped at 400 characters. They differ by trigger - automatic after time away, manual when you ask - not by depth. An illustrative recap for a session working the payments service’s known idempotency defect:

> /recap
⎿ Reviewed the idempotency plan against src/utils/idempotency.ts; confirmed
markProcessed is never called; updated the checklist on disk. Next: write
regression tests before touching the check.

This is the lightweight cousin of /compact. Compaction rewrites the conversation to reclaim tokens; /recap only summarizes it for your benefit and changes nothing about the context. Use recap to orient yourself; use compact when the window itself is the problem. If you find the automatic ones noisy, they toggle off under /config - Session recap.

The third flow-killer is retyping. Over a week you build up the same handful of awkward inputs - the !npm test … | tail -20 incantation, a four-constraint spec. Pulling those back from memory is wasted keystrokes.

Ctrl+R opens reverse history search, the readline motion you already have in your shell. Start typing and it surfaces your most recent matching input; press Ctrl+R again to step back through older matches. In the fullscreen search dialog, Ctrl+S cycles the scope through this session, this project, and all projects. Tab accepts the match into the prompt so you can edit it; Enter accepts and runs it. Esc is the one key that differs by renderer: in the inline search it accepts the match, but in the fullscreen dialog it cancels the search and drops it. An illustrative search, pulling back a spec:

(Ctrl+R) bck-i-search: idempotency
⎿ implement the idempotency fix: ...
[Tab to edit, Enter to submit, Ctrl+R for older matches]

For the simpler case - the last thing you typed - plain Up walks history with no search at all, and reaches prompts from past sessions of the same project: input history is stored per working directory and persists across sessions. One correction to a natural assumption: /clear does not wipe that history. It starts a new session, and recall then lists the new session’s prompts first, with earlier sessions’ still available behind them. What /clear resets is the context, not your fingers.

One nicety runs the opposite direction, surfacing an input you have not typed yet: prompt suggestions. At session open, Claude Code shows a grayed-out example command drawn from your project’s git history; after a response, it can suggest a next prompt from the conversation. Tab or Right arrow accepts one; start typing and it gets out of the way. It is not load-bearing - it occasionally saves you the keystrokes of spelling out an obvious next move.

Three moments from a working afternoon, each a different flow-killer. For each, pick /btw, /recap, or history search - then read the verdicts:

  1. Mid-refactor, one question would settle the next edit - which error string processor.ts throws on a duplicate - but asking in-thread would scatter the refactor across two topics.
  2. Back from lunch, the session holds the morning’s work and the scrollback is a wall.
  3. For the third time today you are about to re-type the same four-constraint fix spec, character for character.

The verdicts, explained. The duplicate-string question is context Claude already holds - a toolless answer beside the conversation, so /btw: the overlay answers, you dismiss it, and the refactor continues uncontaminated. The post-lunch wall is orientation, not reclamation - /recap: one line on where the work stands, and if the window itself were the problem, compact would be the tool instead. The third is your own fingers - history search: Ctrl+R, type idempotency, and the spec comes back for Tab-to-edit rather than re-typing.

You can now move through a session without the small interruptions costing anything: questions stay out of context, catch-up is one command, and nothing gets typed twice. The last set of moves is lower-level still - the editing model and the keys themselves. That’s ergonomics.