# Multi-Turn Reasoning Breaks

## The Problem

Agent fails to maintain reasoning across multiple conversation turns, losing logical thread or failing to build on previous conclusions.

### Symptoms

* ❌ Cannot chain reasoning across turns
* ❌ Forgets intermediate conclusions
* ❌ Restarts reasoning from scratch each turn
* ❌ Doesn't build on previous analysis
* ❌ Multi-step problem-solving fails

### Real-World Example

```
Turn 1:
User: "Does Alice have access to Production DB?"
Agent: "Let me check. Alice is in the Engineering team."

Turn 2:
User: "And does Engineering have access?"
Agent: "Yes, Engineering team has access to Production DB."

Turn 3:
User: "So can Alice access it?"
Agent: "I need to check if Alice is in a team with Production DB access."

Problem:
→ Agent forgot Turn 1 conclusion (Alice in Engineering)
→ Agent forgot Turn 2 conclusion (Engineering has access)
→ Cannot chain: Alice → Engineering → Prod DB
→ Reasoning broke
```

***

## Deep Technical Analysis

### Reasoning State Management

**Inference Tracking:**

```
Track established facts across turns:
Turn 1: Established: Alice ∈ Engineering
Turn 2: Established: Engineering → Prod DB access
Turn 3: Query: Alice → Prod DB?

Reasoning:
→ Alice ∈ Engineering (from Turn 1)
→ Engineering → Prod DB (from Turn 2)
→ Therefore: Alice → Prod DB ✓

Requires explicit fact tracking
```

**Intermediate Conclusions:**

```
Store intermediate results:
{
  "facts_established": [
    {"turn": 1, "fact": "Alice is in Engineering team"},
    {"turn": 2, "fact": "Engineering team has Prod DB access"}
  ],
  "pending_inference": "Can Alice access Prod DB?"
}

Next turn: Use stored facts
→ Don't re-derive
→ Build on them
```

### Context Preservation

**Reasoning Chain Loss:**

```
Without explicit tracking:
→ Each turn processes independently
→ LLM doesn't automatically remember reasoning
→ Must explicitly include past reasoning in context

Solution:
Pass reasoning summary:
"Previous reasoning: Alice is in Engineering. Engineering has Prod DB access."
```

**Partial Reasoning:**

```
User builds complex question across turns:
Turn 1: "Show me Alice's team"
Turn 2: "What databases can that team access?"
Turn 3: "Filter for production ones"

Agent must track:
→ "that team" = "Alice's team" = "Engineering"
→ "production ones" = filter from Turn 2 results
→ Multi-turn query construction
```

### Fact Accumulation

**Evidence Gathering:**

```
Complex question requires multiple facts:
"Can Alice deploy to production?"

Needs:
1. Alice's role (Turn 1: Engineer)
2. Engineer permissions (Turn 2: Can deploy to staging)
3. Production restrictions (Turn 3: Only Senior+ to prod)
4. Alice's level (Turn 4: Senior Engineer)

Conclusion (Turn 5):
→ Combine all facts
→ Answer: Yes (Senior Engineer can deploy to prod)

Requires accumulating evidence across turns
```

### Decomposition Consistency

**Sub-Question Tracking:**

```
Original: "Compare X vs Y for our use case"

Agent decomposes:
Turn 1: "Tell me about X"
Turn 2: "Tell me about Y"
Turn 3: "What's our use case?"
Turn 4: Synthesize comparison

Agent must remember:
→ Still working on original question
→ Sub-questions serve main goal
→ Track progress
```

**Goal Maintenance:**

```
User's overarching goal:
"Set up authentication"

Across conversation:
Turn 1: Explained OAuth
Turn 2: Provided credentials
Turn 3: Troubleshooting error

Agent remembers:
→ Goal: Set up authentication
→ Progress: 70% complete
→ Next: Resolve current error
→ Then: Verify auth works

Goal-oriented conversation
```

***

## How to Solve

**Store established facts from each turn + track intermediate conclusions explicitly + include reasoning summary in context ("Previously established: ...") + implement fact accumulation (gather evidence across turns) + maintain conversation goal state + use chain-of-thought prompting with memory + test multi-turn reasoning scenarios (3+ step inferences) + measure reasoning consistency across turns.** See [Multi-Turn Reasoning](/rag-scenarios-and-solutions/agent/multi-turn-breaks.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.twig.so/rag-scenarios-and-solutions/agent/multi-turn-breaks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
