If you run Claude Code daily, you run it from the CLI. The interactive session is where most of the work happens, and a handful of commands determine the shape of that work: how context accumulates, how you switch between tasks, how you check what is happening under the hood. This covers the six commands I reach for most, how the config file works, and one place where the CLI still falls short.
How the interactive loop works
Running claude in a project directory opens an interactive session. Claude Code reads your working directory, loads any CLAUDE.md files it finds, and waits for input. You send a message, the agent responds, calls tools as needed, edits files when relevant, and waits for the next message.
This loop can run for hours on a complex task or minutes on a quick lookup. Context accumulates as the session runs: the agent holds the conversation history, file reads, tool results, and any context it loaded at startup. At some point the context window fills up, and you need to manage it. Three of the six commands below are about that.
The six commands
/help
Lists every slash command available in the current session, plus any active settings. Run it when you are not sure what is available or have forgotten a command name. Takes a second and answers directly.
/clear
Clears the conversation context completely. The next message is a fresh start in the same directory. The agent does not remember anything from the current session after you run it. Useful when the session has accumulated noise from earlier in the day that is no longer relevant and you want a clean baseline without restarting the terminal.
/compact
Replaces the conversation history with a summary generated by the model. The agent retains a compressed version of what happened rather than a full wipe. The practical advantage over /clear is continuity: if you are several hours into a session and have covered a lot of ground, /compact lets you keep going without re-explaining context from scratch. The tradeoff is that the summary loses fine-grained detail. If a specific earlier exchange was critical (a constraint you established, a decision you made), assume it may not survive compaction. For high-stakes context, /clear and a fresh start is safer.
/model
Switches the model for the current session. Run /model and pick a tier when the task at hand is clearly beyond what the current model is handling: architecture decisions, large-context analysis, anything where Sonnet's output quality is the constraint. Switching back is the same command. You do not need to restart the session.
/cost
Shows token usage for the current session. This is where you check how much context has accumulated and roughly what the session has cost. The number is session-scoped, not cumulative across sessions. Useful before deciding whether to /compact or /clear, since it shows how much context you are actually carrying.
--print (non-interactive mode)
This is a CLI flag rather than a slash command, but it belongs on this list because I use it almost daily. Run claude --print "task description" to get a single response printed to stdout, then exit. No interactive session, no prompts.
claude --print "summarize the changes in the last commit"
Useful for scripting, one-off lookups, and piping output to another tool. On tasks where you know exactly what you want and do not need a back-and-forth session, --print is faster than opening an interactive loop.
The config file
Claude Code reads configuration from a settings file in your home directory for personal settings and from a project-level file in the project root for project-specific settings. The project file takes precedence when both exist.
Two settings I actually set:
model: a specific tier (sonnet / opus / haiku) if you want to override the default
editor: the command your editor registers (code, cursor, zed, nvim)
model sets the default model for every session. If you find yourself switching model at the start of each session, set it here instead.
editor tells Claude Code what to open when it presents a file for you to review.
Check the current Anthropic documentation for the exact file path and the valid model identifier strings for your installed version, since both can shift between releases.
Where the CLI is still rough
Context management does not feel finished.
/compact exists and helps, but the summary it generates loses detail in unpredictable ways. You find out something was dropped when the agent makes a decision that contradicts a constraint you established earlier. The workaround is to keep sessions scoped to shorter tasks, but that is adapting your workflow to the tool's limitations, not getting what the feature promises.
There is no command that shows you what the agent currently knows about your project in a readable summary before you decide whether to compact, clear, or continue. /cost shows token counts. Token counts are not context. You make the compact-or-clear decision with incomplete information about what will be lost.
The --print mode works for simple tasks and falls short on complex ones. Output formatting is inconsistent enough that building reliable automation on top of it is harder than it should be. The feature is clearly aimed at interactive use with scripting as a secondary path.
None of these are reasons to stop using it. Claude Code is the most useful daily coding tool I have run. The note is that the parts managing multi-hour sessions are less polished than the core turn-by-turn loop.
When the tool is not the problem and the work needs more than it can do alone, you can hire a senior engineer for a week.