Anthropic shipped v0.117.0 of its Python SDK on July 16, and two features buried in the changelog deserve more attention than a routine release. The SDK now supports something the team calls “dreaming” and adds support for MCP Tunnels. Both are listed under **api:** in the release notes, meaning they are server-side capabilities exposed through the API, not just client-side helpers.
The term “dreaming” is deliberately evocative. In machine learning, it usually refers to a model generating synthetic data or reflecting on its own outputs. Anthropic has not published a separate explainer for the feature, but the commit message and the SDK’s type stubs suggest it lets developers trigger a mode where the model processes its own prior completions, effectively running an internal loop of self-review and revision before returning a final response. That is a meaningful departure from the standard request-response cycle.
Most frontier models today operate in a single shot. The user sends a prompt, the model generates a completion, and the interaction ends. If the output is flawed, the user must manually re-prompt or build a separate verification step into their application. Dreaming collapses that loop into the API call. The model checks its own work, catches inconsistencies, and refines the answer before the developer ever sees it.
This is not new as a research concept. Google DeepMind published work on self-improving models. OpenAI has experimented with process reward models that score intermediate steps. But shipping it as a first-class API parameter in a production SDK is different. It means Anthropic believes the capability is reliable enough to expose to every developer building on Claude, not just internal research teams.
The second feature, MCP Tunnels, is more straightforward but equally significant. The Model Context Protocol is Anthropic’s open standard for connecting models to external data sources and tools. Tunnels extend that by creating persistent, encrypted connections between a Claude instance and a remote server, bypassing the need for the developer to manage WebSocket infrastructure or polling logic. The SDK commit references a new tunnels module with methods for creating, listing, and deleting tunnels.
Together, the two features point in a clear direction. Anthropic is building the infrastructure for agents that can sustain long-running, self-correcting interactions with external systems. Dreaming handles the internal quality loop. Tunnels handle the external connectivity loop. The agent does not just answer a question. It answers, reflects, connects to a database, retrieves new information, revises its answer, and returns the result in a single API transaction.
This is a bet on autonomy. Not the full-blown, multi-day agent workflows that some startups are pitching, but a more contained version. The model gets a few extra inference steps and a live pipe to a tool server. The developer sets the guardrails. Anthropic provides the primitives.
The security fix in the same release is worth noting. The SDK now uses SecretStr to keep credential material out of Python traceback frame locals. That is a small change with a large surface area. Credentials leaking through exception handling is a well-known vulnerability in Python applications, especially in serverless environments where stack traces get logged to cloud monitoring services. Anthropic is closing a class of bugs that most SDKs ignore until an incident forces the fix.
The documentation updates are routine. Updated model examples, refined field descriptions. But the presence of three separate docs chores in a single release suggests the API surface is expanding faster than the docs can keep up. That is a good sign for adoption. It also means developers should expect more breaking changes in the near term as the dreaming and tunnels APIs stabilize.
What does this mean for AI builders? The immediate implication is that the cost per API call will rise. Dreaming consumes additional inference tokens internally. Tunnels maintain persistent connections that incur compute on both sides. Developers who optimize purely for latency and cost will likely disable both features. But for applications where reliability matters more than speed, the tradeoff is attractive.
Consider a customer support bot that must verify its answers against a knowledge base before responding. Without dreaming, the bot either returns a raw answer and risks hallucination, or the developer builds a separate verification pipeline with a second model call and a retrieval step. With dreaming, the verification happens inside the API. The developer writes less code and the bot returns fewer errors. The cost per call goes up, but the cost per successful call may go down.
The same logic applies to code generation. A model that dreams over its own output can catch syntax errors, missing imports, or logical contradictions before surfacing the code to the developer. That is the difference between a code assistant that generates plausible-looking code and one that generates runnable code.
Anthropic has not published pricing for dreaming or tunnels. Both features are likely in early access or gated behind specific API tiers. But the pattern is clear. The SDK is evolving from a thin wrapper around a completion endpoint into a platform for building reliable, connected agents. That is a strategic move, not just a technical one.
The broader industry is watching. OpenAI has its own agent infrastructure with the Assistants API and function calling. Google is building agent primitives into Vertex AI. But Anthropic is the first to ship a self-reflection loop as a native API parameter. If dreaming works at scale, it could set a new baseline for what developers expect from a model API. The single-shot completion model, where the user is responsible for verification, may start to look like the old way of doing things.
The outstanding question is reliability. Dreaming is only useful if the model’s self-correction is accurate. A model that confidently reinforces its own errors is worse than a model that makes errors and moves on. Anthropic’s safety research, particularly its work on constitutional AI and interpretability, suggests the company has thought about this. But the proof will be in production.
MCP Tunnels face a different challenge: adoption. The Model Context Protocol is open, but it competes with a dozen other tool-calling standards. Developers already have established patterns for connecting models to databases and APIs. Convincing them to adopt a new protocol requires more than a good SDK. It requires tool builders to ship MCP-compatible servers and for the ecosystem to reach critical mass.
Anthropic is playing the long game. Dreaming and Tunnels are not features that will dominate a product launch keynote. They are infrastructure. They reduce friction for the developers who are building the next generation of AI applications. And they signal that Anthropic sees the API not as a endpoint but as a runtime. The SDK is where that vision becomes concrete.