Mastering Claude Code Local Workflow for Engineers


The creator of Claude Code recently revealed his actual workflow, and it challenged everything I thought I knew about using AI coding assistants. Boris Cherny, head of Claude Code at Anthropic, shared that he runs 5 parallel Claude sessions in his terminal, numbered tabs 1-5, with system notifications alerting him when Claude needs input. This approach helped him land 259 PRs with 497 commits in just 30 days.

Most engineers use Claude Code like a fancy autocomplete tool. They open one session, ask questions sequentially, and wait for responses. This fundamentally misunderstands what makes Claude Code powerful. Through implementing AI coding agents at scale, I’ve discovered that the local workflow architecture matters more than the prompts you write.

The Parallel Session Architecture

Running multiple Claude Code instances simultaneously transforms your development velocity. Each terminal tab handles a different concern: one refactors a legacy module while another drafts documentation and a third runs your test suite. The key insight is using separate git checkouts rather than branches or worktrees to avoid conflicts between sessions.

AspectSingle SessionParallel Sessions
ThroughputSequential tasksMultiple concurrent tasks
Waiting timeBlocked during inferenceWorking on other tasks
ContextOne problem spaceMultiple problem spaces
RecoveryLost if session failsOther sessions continue

This architecture requires a mental shift from “Claude does one thing at a time” to “Claude is my engineering team.” You become the orchestrator assigning work across multiple agents rather than the lone developer waiting for AI suggestions.

Session Teleportation and Remote Workflows

Claude Code 2.1.0 introduced session teleportation through the /teleport and /remote-env slash commands. This feature lets you seamlessly move work between your local terminal and the web interface at claude.ai/code. Start a task on your laptop, hand it off to the cloud, then pull it back when you’re at your desktop.

The workflow is straightforward: prefix your prompt with & to send work to Claude Code’s cloud infrastructure. Later, use claude --teleport <session-id> to bring that session, including all history and context, back to your local machine. This is particularly valuable for long-running tasks that would otherwise block your terminal.

Warning: Session teleportation currently works in one direction. You can pull web sessions down to your terminal, but you cannot push existing local sessions up to the web. If you anticipate needing to switch devices, always start with the & prefix.

For engineers building production AI systems, this capability means never losing context when moving between environments. Your entire conversation history, working branch, and accumulated context travel with you.

The Checkpoint System That Changes Everything

The checkpoint system automatically saves your code state before each change. Press Esc twice or use /rewind to instantly return to any previous version. This removes the fear of letting Claude make ambitious changes since you can always recover.

Checkpoints track three restoration options:

  • Conversation only: Rewind to a user message while keeping code changes
  • Code only: Revert file changes while keeping the conversation
  • Both: Restore everything to a prior state

This differs fundamentally from git. Checkpoints capture every intermediate state during a session, not just committed changes. You might have Claude attempt three different approaches to a problem, comparing checkpoints to find the best solution before committing anything to version control.

The limitation to understand: file modifications made by bash commands cannot be undone through rewind. Only direct file edits through Claude’s editing tools are tracked. For permanent history and collaboration, continue using git as your source of truth.

CLAUDE.md as Your Team Knowledge Base

Every team at Anthropic maintains a CLAUDE.md file checked into git. This documents mistakes Claude has made so it learns not to repeat them, along with style conventions, design guidelines, and PR templates. The Claude Code team’s file is currently 2.5k tokens.

This practice transforms Claude from a stateless tool into an evolving team member. When you notice Claude formatting code incorrectly or missing a project convention, add it to CLAUDE.md immediately. The next session starts smarter than the last.

Structure your CLAUDE.md around these sections:

  • Project context: What the codebase does and key architectural decisions
  • Style conventions: Formatting rules, naming conventions, patterns to follow
  • Common mistakes: Specific errors Claude has made with corrections
  • PR guidelines: What constitutes a good pull request in your project

Consider adding learnings from code reviews. Use a tag like @.claude on coworkers’ PRs to flag insights worth preserving. This accumulates team knowledge that benefits every future Claude session, similar to how AI agent documentation compounds value over time.

Custom Slash Commands for Repeated Workflows

Store prompt templates in Markdown files within .claude/commands/ and they become available through the slash commands menu. Boris Cherny uses /commit-push-pr dozens of times daily. The command includes inline bash to pre-compute git status and other context, making execution fast.

Effective slash commands share these characteristics:

  • They handle workflows you perform multiple times per day
  • They include pre-computed context to accelerate execution
  • They’re checked into git so your entire team benefits
  • They work as building blocks Claude can compose

Beyond personal commands, create team commands for your specific domain. A frontend team might have /component-scaffold that generates components matching their design system. A backend team might use /api-endpoint that follows their REST conventions. These commands encode team knowledge into reusable automation.

Verification Feedback Loops

According to Cherny, the most important factor for great results is giving Claude a way to verify its work. When Claude has a feedback loop, whether running tests, checking the browser, or validating in a simulator, the quality of final results increases significantly.

This insight applies to AI coding tools broadly. Autonomous agents without verification produce plausible but incorrect outputs. Agents with tight feedback loops self-correct and converge on working solutions.

Practical verification approaches include:

  • Running your test suite after changes
  • Building the project to catch compilation errors
  • Using linting and formatting checks
  • Testing the application in a browser or simulator
  • Having Claude explain its reasoning before executing

Hooks and Permission Management

PostToolUse hooks automatically trigger actions at specific points. Cherny runs a hook that formats Claude’s code on every Write/Edit, fixing the inconsistent formatting that would otherwise fail CI. This removes manual cleanup from your workflow.

For permission management, use /permissions to pre-allow common bash commands that are safe in your environment. Commands like build, test, and standard development operations shouldn’t require repeated approval. This spares unnecessary prompts without resorting to --dangerously-skip-permissions.

Hooks enable sophisticated automation patterns. Run tests after every code change. Lint before commits. Notify you when long operations complete. The hook system turns Claude Code into an extensible development environment rather than just a chat interface.

Model Selection Strategy

Boris Cherny exclusively uses Opus 4.5 with thinking enabled for everything, calling it the best coding model he’s ever used. His reasoning: though larger and slower than Sonnet, you steer it less and it handles tool use better. The reduced back-and-forth makes it faster in practice.

This challenges the common assumption that faster models are more productive. When you factor in clarification prompts, error corrections, and context rebuilding, a more capable model often completes tasks in fewer total exchanges.

For engineers managing AI coding tool costs, the calculation isn’t cost per token. It’s cost per completed task. A model that completes work in one iteration at higher token cost may be cheaper than a fast model requiring multiple attempts.

Session Hygiene Practices

Use /clear frequently. Every time you start something new, clear the chat. Old history consumes tokens and triggers compaction calls that summarize past conversations. Fresh sessions start faster and cheaper.

Give sessions descriptive names. When running multiple parallel sessions, clear naming lets you find context quickly. Tag sessions by feature, ticket number, or task type.

The combination of aggressive clearing and parallel sessions means you’re always working with focused, relevant context. Instead of one overloaded session trying to remember everything, you have multiple specialized sessions each with clean, relevant history.

Building Your Local Workflow

Start with the fundamentals: set up multiple terminal tabs with numbered sessions. Configure system notifications so you know when Claude needs input. Create a CLAUDE.md in your repository and commit the first few conventions.

Add slash commands incrementally as you notice repeated patterns. Begin with workflows you execute multiple times per day, then expand as your library grows. Share commands with your team through git.

If you’re interested in mastering AI-assisted development workflows, join the AI Engineering community where we share practical implementation strategies and production-tested techniques.

Inside the community, you’ll find engineers actively experimenting with parallel session architectures, custom slash command libraries, and team CLAUDE.md patterns that accelerate development velocity.

Sources

Zen van Riel

Zen van Riel

Senior AI Engineer at GitHub | Ex-Microsoft

I grew from intern to Senior Engineer at GitHub, previously working at Microsoft. Now I teach 22,000+ engineers on YouTube, reaching hundreds of thousands of developers with practical AI engineering tutorials. My blog posts are generated from my own video content, focusing on real-world implementation over theory.

Blog last updated