SOP-003: Interactive Mode
DOCUMENT CONTROL
| Field | Value |
|---|---|
| SOP ID | SOP-003 |
| Version | 1.0 |
| Status | Active |
Purpose
Guide for using Claude Code's interactive REPL mode effectively for software development tasks.
Interactive Mode Overview
┌─────────────────────────────────────────────────────────────────────┐
│ INTERACTIVE MODE FLOW │
└─────────────────────────────────────────────────────────────────────┘
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ START │────►│ PROMPT │────►│ CLAUDE │
│ claude │ │ INPUT │ │ PROCESSES │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
┌───────────│ TOOL │
│ │ CALLS │
│ └─────────────┘
▼ │
┌──────────┐ ▼
│ APPROVE? │◄────────────────────┐
└──────────┘ │
│ │
┌─────────┴─────────┐ │
▼ ▼ │
┌──────────┐ ┌──────────┐ │
│ YES │ │ NO │ │
└────┬─────┘ └──────────┘ │
│ │
└────────────────────────────────────┘Starting Interactive Mode
bash
# Basic start
claude
# With specific working directory
claude --cwd /path/to/project
# With initial context
claude "let's work on the auth module"Interface Elements
╭─────────────────────────────────────────────────────────────────────╮
│ Claude Code tokens: 1.2k $0.02 │
│ ~/projects/my-app claude-sonnet-4 │
╰─────────────────────────────────────────────────────────────────────╯
> Your prompt here_
┌─────────────────────────────────────────────────────────────────────┐
│ STATUS BAR ELEMENTS │
├─────────────────────────────────────────────────────────────────────┤
│ • Project path │
│ • Token count (current session) │
│ • Cost estimate │
│ • Current model │
└─────────────────────────────────────────────────────────────────────┘Tool Approval Flow
When Claude wants to execute tools:
┌─────────────────────────────────────────────────────────────────────┐
│ TOOL APPROVAL PROMPT │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Claude wants to run: Bash │
│ Command: npm install express │
│ │
│ [y] Yes [n] No [a] Always allow [e] Explain │
│ │
└─────────────────────────────────────────────────────────────────────┘Approval Options
| Key | Action | Effect |
|---|---|---|
y | Yes | Allow this single execution |
n | No | Deny this execution |
a | Always | Allow this tool for session |
e | Explain | Ask Claude to explain why |
Multi-Line Input
For complex prompts:
- Type
\at end of line to continue - Or use special markers:
"""to start/end multi-line- Paste directly (detects multi-line)
> I need help with:
> - fixing the auth bug
> - adding tests
> - updating docsIncluding Files and Images
bash
# Include file in prompt
> @src/auth.ts explain this file
# Include image (vision)
> @screenshot.png what's wrong with this UI?
# Include multiple files
> @src/models/*.ts review these modelsSession Control Commands
| Command | Description |
|---|---|
/clear | Clear conversation history |
/compact | Compress context to save tokens |
/cost | Show current session cost |
/undo | Undo last change |
/quit or Ctrl+D | Exit session |
Agentic Mode
Enable autonomous multi-step execution:
┌─────────────────────────────────────────────────────────────────────┐
│ AGENTIC EXECUTION │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ > Build a REST API with user auth │
│ │
│ Claude will autonomously: │
│ 1. Create project structure │
│ 2. Install dependencies │
│ 3. Write route handlers │
│ 4. Add authentication middleware │
│ 5. Create tests │
│ 6. Run tests to verify │
│ │
│ (Each step may request approval based on settings) │
│ │
└─────────────────────────────────────────────────────────────────────┘Controlling Agentic Behavior
bash
# Limit autonomous turns
claude --max-turns 10
# Require approval for each step
# (Configure in settings)Best Practices
Effective Prompting
- Be specific - Clear, detailed requests get better results
- Provide context - Mention relevant files, patterns, constraints
- Iterate - Refine through follow-up prompts
- Review - Check changes before accepting
Common Pitfalls
- Don't approve changes without reviewing
- Watch token usage on long sessions
- Use
/compactwhen context gets large - Save important changes frequently
Verification Checklist
- [ ] Can start interactive session
- [ ] Understand tool approval flow
- [ ] Know how to include files
- [ ] Familiar with session commands
- [ ] Understand agentic mode