What a Claude Code Session Actually Looks Like: Three Real Workflows
The Setup
Before showing what sessions look like, it helps to understand how Claude Code runs. You open a terminal, navigate to your project, and type claude. It starts a session that can read your files, run shell commands, and use git. You give it a task. It shows you what it plans to do. You approve or redirect. It works through it and reports back.
The session persists context — it remembers what you have done within the session. Between sessions, you can resume previous work if you want to continue where you left off.
Workflow 1: Writing a Test Suite
You have a module that handles user authentication. You know what it does. You want tests for it.
You start a session:
cd ~/projects/my-app
claude
You give it the task:
Write tests for the auth module. Focus on token validation and refresh token flow. Use the same testing framework as the rest of the project. Do not modify the source files.
Claude Code reads the auth module, understands the structure, and reads the existing test setup to match the patterns. It proposes a test file structure. You approve. It writes the tests.
You run them:
npm test -- auth.test.ts
They pass or they do not. If they do not, you tell Claude Code what failed and it adjusts. The session stays open — you are working together on the same problem, not sending discrete requests.
Workflow 2: Debugging Across Multiple Files
Something is wrong with the checkout flow. Users are reporting that discount codes are being ignored in some cases. You have narrowed it down to the order processing module but the logic is tangled.
You start a session and give it context:
Discount codes are being silently ignored in some checkout scenarios. I have narrowed it down to the order processing module. Help me trace through the logic to find where the code diverges from the expected behavior.
Claude Code reads the order processing module, traces the discount code path, and finds the issue — a conditional that checks for a discount code object but does not handle the case where the code is an empty string rather than null. It shows you the specific line and explains why it would cause the behavior you are seeing.
You confirm the diagnosis is correct. You ask it to fix it:
Fix the discount code handling. Add a test case for empty string that currently fails.
Claude Code writes the fix and the test. You review both. The test passes.
Workflow 3: Large Refactor
You need to rename a function that appears across 40 files and update all the call sites. This is tedious manual work that takes forever and is easy to get wrong.
You start a session:
Rename processUserRequest to handleUserRequest across the entire codebase. This function is in src/utils/auth.ts and is called throughout src/. Update all call sites and make sure the function signature stays compatible. Do not touch test files.
Claude Code reads the function definition, finds all the call sites, and proposes a plan: here are the files that need changes, here is what each change looks like. You approve. It works through the files, updating each call site.
You run the test suite:
npm test
Everything passes. The refactor is done in a few minutes instead of an hour of find-and-replace that you would have done yourself.
What These Have in Common
Three different task types. In each case, Claude Code is working with your actual project context rather than hypothetical code. It sees the files, understands the patterns, and produces output that fits what is already there.
The session-based model matters here. You are not sending a prompt and getting a response. You are working through a problem together, with back-and-forth as you discover what the right approach is.
Get Started with Claude Code
Start building with Claude Code today. Free to download, powerful enough for production.