Skip to content

SOP-003: Interactive Mode

DOCUMENT CONTROL

FieldValue
SOP IDSOP-003
Version1.0
StatusActive

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

KeyActionEffect
yYesAllow this single execution
nNoDeny this execution
aAlwaysAllow this tool for session
eExplainAsk Claude to explain why

Multi-Line Input

For complex prompts:

  1. Type \ at end of line to continue
  2. 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 docs

Including 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 models

Session Control Commands

CommandDescription
/clearClear conversation history
/compactCompress context to save tokens
/costShow current session cost
/undoUndo last change
/quit or Ctrl+DExit 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

  1. Be specific - Clear, detailed requests get better results
  2. Provide context - Mention relevant files, patterns, constraints
  3. Iterate - Refine through follow-up prompts
  4. Review - Check changes before accepting

Common Pitfalls

  • Don't approve changes without reviewing
  • Watch token usage on long sessions
  • Use /compact when 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

Next Steps

Based on Official Claude Code Documentation