Lesson 3 of 21 ~18 min
Course progress
0%

Conversation Management

Master conversation structure, context building, and effective multi-turn interactions with Claude.

Conversation Management

Learn to structure conversations effectively, build context progressively, and maintain productive multi-turn interactions with Claude.

Conversation Architecture

Single-Turn vs Multi-Turn

Single-Turn - Standalone questions:

What's the difference between let and const in JavaScript?

Multi-Turn - Building on context:

Turn 1: Explain JavaScript variable declarations
Turn 2: Now show me when to use each one
Turn 3: What happens if I reassign a const?
Turn 4: Can you show a practical example?

Multi-turn conversations let you:

  • Build shared understanding progressively
  • Refine solutions iteratively
  • Explore topics in depth
  • Maintain context across related questions

Context Building Strategies

Progressive Disclosure

Start broad, add details as needed:

Turn 1:

I'm building a user authentication system.

Turn 2:

Using JWT tokens. Need to handle expiration.

Turn 3:

Here's my current implementation: [code]
How do I add refresh tokens?

Context Anchoring

Set context once, reference throughout:

Initial Context:

For this conversation:
- Project: E-commerce platform
- Stack: Next.js 14, PostgreSQL, Stripe
- Current phase: Payment integration
- My role: Full-stack developer

Then ask questions:

How should I structure the webhook handler?
What database schema do you recommend?

Claude remembers the initial context for all follow-up questions.

Conversation Patterns

The Discovery Pattern

Use when exploring options:

1. "What are different approaches to implement caching?"
2. "Redis sounds interesting. How does it compare to in-memory?"
3. "For Redis, what's the setup process?"
4. "Show me a practical implementation with Express"

The Refinement Pattern

Iterate towards optimal solution:

1. "Create a user registration function"
2. "Good, now add email validation"
3. "Add password strength requirements"
4. "Include error handling for duplicate emails"
5. "Perfect, now add rate limiting"

The Debugging Pattern

Systematic problem solving:

1. "I have a bug: [describe symptom]"
2. "Here's the relevant code: [paste]"
3. "I tried [solution A], didn't work because..."
4. "Based on your suggestion, I modified [this]"
5. "Still having issues with [specific part]"

Managing Conversation State

Track Progress

Keep mental model of conversation:

# Conversation Map

✅ Discussed: Database schema design
✅ Implemented: User model
🔄 Current: Authentication middleware
⏳ Next: Password reset flow
📋 To do: Email verification

Summarize When Needed

If conversation gets long:

To summarize what we've built so far:
1. User model with bcrypt password hashing
2. JWT authentication with 24h expiration
3. Login/signup endpoints
4. Auth middleware for protected routes

Now let's add password reset functionality.

Reference Previous Points

Build on earlier discussion:

Earlier you suggested using Redis for session storage.
How would that integrate with the JWT approach we discussed?

Handling Context Limits

When Approaching Limit

Signs you’re hitting limits:

  • Very long conversation history
  • Claude starts “forgetting” earlier context
  • Performance slowdown

Solutions:

1. Summarize and Continue:

Let me summarize our progress: [key points]
Starting fresh conversation to continue with [next topic].

2. Extract to New Thread:

We've designed the schema. I'll start new conversation 
for implementation, referencing: [link to previous chat]

3. Use Projects Feature:

  • Save important context in Project knowledge
  • Reference across multiple conversations

Conversation Hygiene

Keep conversations focused:

❌ Mixing Topics:

Help with React hooks... 
Also, what's the best database?
And how do I deploy to AWS?

✅ Focused:

Help with React hooks
[Complete that topic]
[New conversation for database]
[Another for deployment]

Advanced Techniques

Conversation Checkpoints

Create save points in long conversations:

Great! Let's checkpoint here.

Completed:
- API design ✓
- Database schema ✓
- Authentication ✓

Next up: 
- Payment integration
- Email service
- Admin dashboard

Ready to proceed with payment integration?

Parallel Conversations

Use multiple conversations for:

  • Different aspects of same project
  • Experimental vs production approaches
  • Learning vs implementation

Example:

  • Conversation A: Production API implementation
  • Conversation B: Learning advanced patterns
  • Conversation C: Debugging specific issue

Context Injection

Re-introduce important context:

Reminder: We're building a React app with TypeScript,
using the component structure we designed earlier.

Now, how do we add state management with Zustand?

Best Practices

1. Start Clean

Begin each major topic fresh:

New topic: Implementing WebSocket chat
Previous context: Can be ignored
Starting from: Basic setup

2. Be Explicit About Context

Using the database schema from earlier in this conversation,
how would I add a new 'posts' table?

3. Course Correct Early

If conversation veers off:

I think we got sidetracked. Let's refocus on 
the original issue: [restate problem]

4. End Gracefully

Conclude conversations clearly:

Perfect! This solves my authentication needs.
Thanks for the help. Marking this as resolved.

Conversation Templates

Quick Help Template

Quick question about [topic]:
- Current situation: [context]
- What I tried: [attempts]
- Specific issue: [problem]
- Need: [desired outcome]

Deep Dive Template

I want to deeply understand [topic]

My current level: [beginner/intermediate/advanced]
Learning goal: [what you want to achieve]
Preferred style: [theoretical/practical/both]

Let's explore:
1. [First aspect]
2. [Second aspect]
3. [Third aspect]

Implementation Template

Implementing [feature] with these requirements:
- Must have: [critical features]
- Nice to have: [optional features]
- Constraints: [limitations]
- Tech stack: [technologies]

Phase 1: [First step]
Let's start here.

Practical Example

Effective Multi-Turn Conversation:

Turn 1:

I need to build a file upload system for my app.
Stack: Node.js, Express, AWS S3

Turn 2:

Good architecture! How do I handle large files (>100MB)?

Turn 3:

Multipart upload makes sense. Can you show the implementation 
for the Express route and S3 configuration?

Turn 4:

This works! Now how do I add progress tracking?

Turn 5:

Perfect. One more thing: how do I handle upload failures 
and implement retry logic?

Each turn builds on previous context, staying focused on one feature.

Key Takeaways

  1. Build context progressively - Start simple, add details
  2. Stay focused - One topic per conversation
  3. Reference previous points - Build shared understanding
  4. Checkpoint progress - Summarize at key points
  5. Manage length - Split long conversations
  6. Be explicit - State what context to use
  7. End clearly - Conclude when done

What's the advantage of multi-turn conversations?

They use less tokens
They're faster
They build shared understanding progressively
They avoid context limits

When should you start a new conversation?

After every question
Never, always continue
Every hour
When switching major topics or hitting limits

How should you handle long conversations?

Keep going until it breaks
Summarize and create checkpoints
Delete old messages
Start over completely

What's context anchoring?

Setting context once, referencing throughout
Repeating context every turn
Avoiding context entirely
Using external links