---
title: "Framework Support"
description: "How each agent framework runs a turn on Dex, which session features it supports, and its limits."
canonical_url: "https://docs.superdurable.io/agent-frameworks/framework-support/"
source: "docs/content/agent-frameworks/framework-support.mdx"
locale: "en"
framework: "claude-agent-sdk"
---

> Index of every page for AI agents: https://docs.superdurable.io/llms.txt

# Framework Support

This file shows the Claude Agent SDK version. Other frameworks: [Google ADK](https://docs.superdurable.io/agent-frameworks/framework-support.google-adk.md) · [LangChain and LangGraph](https://docs.superdurable.io/agent-frameworks/framework-support.langchain-langgraph.md) · [Mastra](https://docs.superdurable.io/agent-frameworks/framework-support.mastra.md) · [OpenAI Agents SDK](https://docs.superdurable.io/agent-frameworks/framework-support.openai-agents-sdk.md) · [Pydantic AI](https://docs.superdurable.io/agent-frameworks/framework-support.pydantic-ai.md) · [Vercel AI SDK](https://docs.superdurable.io/agent-frameworks/framework-support.vercel-ai-sdk.md)

Every agent framework runs on the same session Flow through its own adapter. Pick your framework to see how its turn maps onto Steps, which session features it has, and its limits.

<a id="how-each-framework-runs-a-turn"></a>

## How your framework runs a turn

Most adapters stop the framework before a tool runs, so each tool call runs in its own Step, in parallel: `CallTool` for a read or an idempotent write, `CallSingleAttemptTool` for any other write. A call that needs approval waits in `AwaitToolApproval` first. The next `RunModel` gives the framework the recorded results, so no tool runs again. A turn that looks up an order runs `RunModel`, `CallTool`, `ResumeTurn`, and `RunModel`. The Claude Agent SDK is the exception: it runs reads inside `RunModel`.

The tabs show how each framework is stopped and resumed, and where a framework differs.

The Claude Agent SDK runs Claude Code as an agent. Its agent loop runs in the Claude Code CLI, a subprocess of the Worker. The Dex adapter runs that loop inside a durable session. It is available for Python and TypeScript.

**When to use it**

Use it when you want the Claude Code agent loop, its context management, and its tools. Use it when your agent already uses the Claude Agent SDK.

Use the [built-in agent loop](https://docs.superdurable.io/agent-frameworks/built-in-agent-loop.md) when you want one model call per Step, parallel tool Steps, or Dex compaction.

**How a session runs**

Claude Code runs a whole turn, so the adapter splits a turn into segments. One `RunModel` Step runs the CLI for one segment. Model calls run inside the segment. So do read tools: a deferred read would restart the CLI. A Connector tool call is the exception: it always leaves the segment, even a read. See [Connect Connectors](https://docs.superdurable.io/agent-frameworks/connectors-as-tools.md#connect-connectors).

A write tool call ends the segment. It waits in `AwaitToolApproval` when it needs approval. Then it runs in its own Step: `CallTool` for an idempotent write, `CallSingleAttemptTool` for any other write. `ResumeTurn` then returns to `RunModel`, which resumes the same Claude session. The CLI gets the recorded result and does not run the tool again.

A failed segment retries, up to three attempts, and reruns whole. Model calls and reads inside it run again. A write that ran in its own Step does not run again when the segment retries.

A turn that looks up an order runs one `RunModel` Step. A turn that cancels an order runs `RunModel`, `AwaitToolApproval`, `CallSingleAttemptTool`, `ResumeTurn`, and `RunModel`.

<a id="features-by-harness"></a>

## Features by harness

Some session features depend on the harness:

| Feature                                       | Framework adapters               | Built-in agent loop |
| --------------------------------------------- | -------------------------------- | ------------------- |
| Queued messages, **Steer**, and `cancel_turn` | Yes                              | Yes                 |
| Dex compaction of old messages                | Yes, except the Claude Agent SDK | Yes                 |
| Questions to the user (`ask_user`)            | No                               | Yes                 |
| Plans (plan mode and `execute_plan`)          | No                               | Yes                 |

<a id="limits"></a>

## Limits

Each tab lists the limits of one adapter that change how you write an agent, with what to do instead.

- One write call per segment leaves the turn. A reply with two writes costs one more segment and model call. The writes of one reply never run as parallel Steps.
- Tools that run inside the CLI, such as **Bash** or **Edit**, are at least once. They run again when a segment reruns. Files the CLI changes are not recorded.
- A segment must finish within the `RunModel` method timeout, 15 minutes by default. Raise it with `run_model_limit` in Python or `runModelLimit` in TypeScript.
- Claude Code compacts its own transcript, and Dex compaction stays off. A long session ends at the state limit, not the context window: the active state of one session, 64 MiB by default ([Session limits](https://docs.superdurable.io/reference/agents/session-limits.md)).
- A recorded tool result keeps text only.
- A write call inside a subagent is denied. The model is asked to call it from the main conversation.

[Limits for long sessions](https://docs.superdurable.io/reference/agents/session-limits.md) has the server limits.

## Next

- [Built-in Agent Loop](https://docs.superdurable.io/agent-frameworks/built-in-agent-loop.md): the harness with every session feature.
- [Run Agents in Production](https://docs.superdurable.io/agent-frameworks/production.md): the checklist before you run sessions for real users.
