Claude Code·Task 3.1·Bloom: understand·Difficulty 2/5·8 min read·Updated 2026-07-11

Claude Code Features and Run Modes: Sessions, Headless, and Slash Commands

Claude Code Operation (3.1%): Claude Code core components (Rules, Skills, Commands, Agents, Agent Memory), features (session management, built-in and custom slash commands, headless mode, streaming mode, auto-mode), the CLAUDE.md hierarchy, repository initialization, and settings.json configuration.

SUBy Solomon UdohReviewed by Solomon UdohAI-assisted · human-reviewed
In short
Claude Code runs in more than one mode: session management resumes and forks work so context is preserved across runs, headless mode runs it non-interactively for automation and CI, streaming mode returns incremental output, and auto mode executes autonomously. Custom slash commands package repeatable prompts and workflows for a team.

From components to operation

The previous knowledge point named the core components of Claude Code, the Rules, Skills, Commands, Agents, and Agent Memory that customise it inside a repository. This one is about actually operating the tool: the features and run modes you use to get work done. Where identifying the components is a remember-level task, this is an understand-level task on the Claude Certified Developer - Foundations (CCDV-F) exam, so the questions ask you to reason about which feature or mode fits a situation, not merely to name them.

Three ideas carry most of the weight here: session management, the different run modes (headless, streaming, and auto), and custom slash commands. Learn what each one is for and, just as importantly, learn the pairs the exam deliberately blurs, interactive versus headless, and streaming versus auto. Those confusions are where the marks are won and lost.

Claude Code run modes and features
The ways you operate Claude Code beyond a single interactive chat: session management (resume and fork work to preserve context across runs), headless mode (non-interactive execution for automation and CI), streaming mode (incremental output), auto mode (autonomous execution), and custom slash commands (packaged, invokable prompts and workflows).

Session management: resume and fork

Session management is what lets your work with Claude Code persist across separate runs instead of starting cold every time. Two capabilities matter. You can resume a session, picking up a prior conversation with its context intact so you continue where you left off rather than re-establishing everything. And you can fork a session, branching from an existing one to explore a different direction while keeping the original untouched.

The point of both is context preservation. A long piece of work does not have to live in one unbroken sitting; resuming carries the accumulated context forward, and forking lets you try an alternative path without losing the line you were on. This connects to the durable-context idea from the components: sessions are how the work itself is carried across runs, complementing the Agent Memory that holds durable facts within them.

Headless mode: running without a human

Headless mode runs Claude Code non-interactively. There is no live chat at a terminal; instead the tool is invoked programmatically, driven by a script or a pipeline, and it does its work without a person prompting it turn by turn. This is the mode that makes automation and continuous integration possible: you can wire Claude Code into a CI job, a scheduled task, or any workflow where no human is sitting at the keyboard to answer questions.

Understanding headless mode is what dismantles the most common misconception on this knowledge point, that interactive chat is the only way to run Claude Code. It is not. Interactive mode is the default experience, but headless mode is a first-class way to operate the tool, and it is precisely what you reach for when the work needs to run unattended. Recognising that automation path exists is often the whole point of an exam item here.

resume + fork
what session management gives you
non-interactive
the defining property of headless mode
2 axes
streaming (delivery) vs auto (autonomy)

Streaming mode versus auto mode

These two are the sharpest trap in the knowledge point because they sound similar and are easily conflated, yet they describe entirely different things.

Streaming mode is about how output is delivered. Rather than waiting for a complete response and returning it all at once, streaming returns the output incrementally, token by token or chunk by chunk, as it is produced. It affects when you see results, not what the tool is allowed to do.

Auto mode is about how work is executed. It lets Claude Code proceed autonomously, carrying out steps with less step-by-step human approval, so the tool drives its own execution further before pausing. It affects the degree of autonomy, not the delivery of text.

Hold the two axes apart: streaming is a delivery mechanism, auto is an autonomy setting. A run could stream its output while still asking for approval at each step, or execute autonomously while returning results only when finished. Conflating "output appears incrementally" with "the tool acts on its own" is exactly the error the exam sets, and keeping delivery separate from autonomy is how you avoid it.

Two independent axes: delivery and autonomy
Loading diagram...
Streaming answers 'how do results arrive?'; auto answers 'how much does the tool decide on its own?' They are not the same question.

Custom slash commands: packaging workflows

Claude Code ships with built-in slash commands, and it also lets a team define custom ones. A custom slash command packages a repeatable prompt or workflow behind a single invokable name, so that instead of retyping a long instruction every time, a teammate types the command and the packaged workflow runs. This is the same Command component from the previous knowledge point, now viewed as an operational feature: it is how a team turns its recurring prompts into shared, one-line actions.

The value is consistency and reuse across a team. A well-designed custom slash command captures the right way to do a recurring task once, then makes it trivially repeatable for everyone. Because these commands are configured as part of a project's setup, they live alongside the broader CLAUDE.md and settings.json configuration that shapes how Claude Code behaves in a repository, and they pair naturally with focused work split out through subagents.

What the exam trips candidates on

The CCDV-F exam tests two specific confusions on this knowledge point, and both come from underestimating how flexibly Claude Code can be operated.

The first is assuming interactive mode is the only way to run Claude Code, and therefore missing headless automation entirely. If a scenario describes needing Claude Code to run inside a CI pipeline or a scheduled job with no human present, and an answer implies that is impossible or that you must sit and chat with it, that answer is wrong. Headless mode is the non-interactive path built for exactly this, and knowing it exists is frequently the crux of the question.

The second is confusing streaming mode with auto mode. Streaming is incremental output; auto is autonomous execution. Because both are "modes" and both sound like they make things faster or more hands-off, they get swapped. Anchor streaming to delivery and auto to autonomy, and treat any option that describes streaming as "the tool acting on its own," or auto as "showing output as it types," as the distractor it is.

Worked example

A platform team wants Claude Code to run a nightly documentation-freshness check as part of their CI pipeline, with no engineer present, and they want the job's output to appear progressively in the CI log rather than all at the end. A teammate claims this is impossible because Claude Code only works as an interactive chat, and separately proposes turning on 'auto mode' to get the progressive log output. Untangle it.

Start with the first claim, that Claude Code only works interactively. That is the exact misconception this knowledge point targets. A nightly CI job with no human present is the textbook case for headless mode, which runs Claude Code non-interactively so it can be driven by the pipeline. So the task is entirely possible; the teammate has simply missed that automation path.

Now the second claim, that auto mode is what produces progressive log output. This conflates the two axes. Wanting output to appear incrementally in the log is a request about delivery, which is streaming mode. Auto mode is about autonomy, how far the tool proceeds without step-by-step approval, and has nothing to do with whether text arrives incrementally. The teammate reached for the autonomy setting to solve a delivery problem.

The correct shape of the solution: run the check in headless mode so it works unattended in CI, and use streaming if you want the output to surface progressively in the log. Whether you also enable auto mode is a separate decision about how much autonomy to grant the run, independent of both. Three features, three distinct jobs, and the errors in the scenario are precisely the two the exam likes to test.

Common misreadings to avoid

Misconception

Claude Code is an interactive chat tool, so it always needs a person at the terminal to prompt it.

What's actually true

Headless mode runs Claude Code non-interactively, driven by scripts and CI with no human present. Interactive chat is the default, not the only, way to operate it, and missing the automation path is a documented exam trap.

Misconception

Streaming mode and auto mode are basically the same thing, they both make Claude Code run more automatically.

What's actually true

They sit on different axes. Streaming mode governs how output is delivered (incrementally); auto mode governs how work is executed (autonomously, with less step-by-step approval). Delivery and autonomy are independent.

How it shows up on the exam

Domain 3, Claude Code, is a small, focused domain, and this knowledge point is its understand-level item under task statement 3.1. Expect scenarios rather than definitions: a team needs Claude Code to run somewhere without a person, or a candidate mixes up which mode produces incremental output, and you are asked to pick the feature that fits or to correct the mistake. Because it is an understand-level target, naming the mode is not enough; you have to reason about which one solves the described need.

The reliable strategy is to keep the vocabulary crisp and the two trap-pairs separated. Session management is resume-and-fork for preserving context; headless is non-interactive for automation; streaming is incremental delivery; auto is autonomous execution; custom slash commands package workflows for reuse. This knowledge point builds directly on the core components, so if the difference between a Command and the other building blocks is still fuzzy, revisit that first, and the slash-command half of this topic will click into place.

Check your understanding

An engineering team needs Claude Code to run a security-lint task automatically inside their CI pipeline every time a pull request opens, with no engineer interacting with it. Which capability makes this possible?

People also ask

What is headless mode in Claude Code?
Headless mode runs Claude Code non-interactively, without a live chat, so it can be driven by scripts, automation, and CI pipelines. It is the mode you use when no human is at the terminal.
What is the difference between streaming mode and auto mode?
Streaming mode governs how output is delivered, incrementally as it is produced, while auto mode governs how work is executed, autonomously with less step-by-step approval. Delivery and autonomy are separate axes.
How does session management work in Claude Code?
It lets you resume a prior session to continue with its context intact, or fork a session to branch into a different direction, so context is preserved across separate runs instead of starting cold.

Watch and learn

Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.

No videos curated for this concept yet

We are still curating the best official and community videos for this topic.

References & primary sources

Adaptive study

Master this concept with Archie

Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.

Start studying