How Temporal Cloud replaced cross-Namespace Activities with Nexus

AUTHORS
PUBLISHED
Dec 01, 2026
DURATION
9 MIN
  • Architecture
  • Cloud
  • Debugging
TL;DR
Temporal Cloud’s control plane used to reach the infrastructure plane through Activities that started Workflows in another Namespace. We replaced about 70 of those calls with Nexus Operations. Now the handler owns how its Workflows start, and the Temporal UI links each call straight to the Workflow it started.

For a long time, debugging a stuck Namespace creation in Temporal Cloud meant working in two places at once. We’d copy a Workflow ID out of an Activity’s input in the control plane, then paste it into a search in the infrastructure Namespace and hope we’d grabbed the right one.

It was a tricky place for us to be, because we tell customers who split teams across Namespaces to connect them with Nexus, and our own control plane was still crossing that boundary the old way. Temporal Cloud is built on Temporal, so every customer request becomes a Workflow, and plenty of those Workflows have to reach across Namespace boundaries: the control plane orchestrates the request, and the infrastructure plane provisions the resources that make it real.

A Workflow in one Namespace cannot start a Child Workflow in another. Until recently, we bridged that gap with Activities: a control-plane Workflow ran an Activity, and that Activity started a Workflow in the infrastructure Namespace. It worked, but it was also a leaky, expensive way to call another team’s service.

Temporal Nexus is the platform feature designed for these calls. A caller Workflow invokes a named Operation on a Nexus Endpoint, and the handler controls how the work runs. In Temporal Cloud, we used Nexus to replace those cross-Namespace Activities for about 70 infrastructure APIs, and both the contract between teams and day-to-day debugging got simpler.

Below, we’ll walk through what the Activity bridge cost us and what we had to get right during the migration.

A tale of two Namespaces#

When a customer clicks Create Namespace, that one click sets off a Workflow in the control plane, which writes database records and sets permissions before asking the infrastructure plane to provision the routing and compute behind that Namespace.

Those two planes run in isolated Namespaces, and isolation is the point: separate Workers and separate access. Before Nexus, the only supported way to start a Workflow in the other Namespace was an Activity in the caller Namespace that held a Temporal Client for the handler Namespace and started a Workflow there.

Before, the caller’s Activity chose the handler’s Task Queue and left no link between the two Workflows. After, the Nexus handler starts its own Workflow, and the UI links the two in one click.

Why Activities are a poor fit for cross-Namespace calls#

The Activity bridge kept working, which made its costs easy to live with until we added them up.

The caller had to know how the handler starts Workflows#

That Activity is not an RPC. Its job is “start this Workflow over there.” Besides the business input, the payload can carry the handler’s start contract: Task Queue, Workflow ID, Retry Policy, and Search Attributes. The caller also has to treat the hop as an Activity, with heartbeats, a Schedule-to-Close timeout, wait-for-cancellation, and a parent-close policy. Those details should belong to the infrastructure plane.

A Nexus Endpoint keeps that contract with the handler. The caller names an Endpoint and an Operation and passes the input. The handler chooses the Task Queue, Workflow ID, and Search Attributes when it starts the backing Workflow. Callers never need to know the handler’s Namespace or Task Queue. That is where the Nexus programming model helps.

The caller had to register the other team’s APIs as Activities#

To start those Workflows, we registered generated Activities in the control-plane Worker for every infrastructure API we needed to call, on the order of 70 operations, each with start-and-wait plumbing. Every time the infrastructure team added an API, the control-plane Worker needed a new generated Activity too, so one change meant two teams shipping. That is a lot of surface area for a boundary that should have been a service contract, not a second copy of the handler’s Workflow catalog.

Nexus Operations live on the handler Worker, behind one Endpoint. The caller Worker does not register the other Namespace’s Workflows.

Debugging meant copy-paste across Namespaces#

Unlike a Child Workflow, an Activity that starts a Workflow in another Namespace does not give you a link in the Temporal UI, so we copied Workflow IDs and searched in the other Namespace, and that slowed down debugging.

Nexus records the Operation on the caller and links it to the handler’s Workflow Execution. In the UI, getting to the matching Workflow is a click, not a scavenger hunt. See Nexus execution debugging.

Why we moved to Nexus#

The Activity path was working. We still migrated because Nexus is the product we ship for this problem.

Nexus is for isolated Namespaces that still need to collaborate. That is how we run Temporal Cloud, and it is the same pattern we recommend to customers who split teams across Namespaces.

What to plan for when you migrate to Nexus#

Nexus made the calls simpler, but the migration still had a few sharp edges, so here’s what we had to get right.

Plan payload encoding at the Namespace boundary#

The caller Worker and the handler Worker must encode and decode the Operation payload the same way. When both Namespaces share the same codec and key, this is straightforward. In practice, they usually use different codecs or keys.

Each Namespace can keep encrypting its own Workflow history with its own keys. But for the Nexus request itself, the bytes on the wire have to be something the handler can read. If the caller encrypts the payload with a key the handler does not have, the Operation fails during decoding. Plan the codec configuration at the Namespace boundary: use a shared encoding for that Endpoint, or leave the outbound payload in a form the handler already understands. Apply the same approach to decoding the response. See Nexus security.

Generate the client and the handler from the same API#

We define infrastructure APIs in protobuf and generate Temporal bindings from them with an internal code generator, which also produces the Nexus clients and handlers. The control plane calls a generated Nexus client, and the infrastructure Worker serves the generated handler. The Operation name, input, and output remain part of a single contract, which made the migration mechanical and avoided a rewrite of every call site.

Prefer asynchronous Operations for long-running work#

Synchronous Nexus Operations must finish within the 10-second handler deadline. If that deadline is missed, the Nexus Machinery retries the start until the Operation’s Schedule-to-Close timeout is reached. Synchronous Operations are a good fit for a fast Signal, Query, or SDK client call. They are a poor fit for provisioning infrastructure.

Our calls start Workflows that can run for minutes or hours. Those are asynchronous Operations: the handler returns an Operation token, and the backing Workflow delivers the result when it completes.

Know when the Nexus circuit breaker trips#

Currently, Nexus applies circuit breaking per caller Namespace and Endpoint pair, not per Operation. By default, the breaker opens after five consecutive retryable errors. Timeouts, handler 5xx errors, and a Task Queue with no Workers all count. While it is open, every Operation from that caller to that Endpoint is blocked. After 60 seconds, it sends a single probe. Success closes the breaker, and failure opens it for another minute.

An unreliable synchronous handler can take down the whole Endpoint for every caller in that Namespace. Keep handlers reliable, keep Workers polling, and use asynchronous Operations for anything that cannot finish well inside the 10-second deadline.

Test the Operation, then roll it out slowly#

In unit tests, we stubbed Nexus invocation and asynchronous completion so we could catch issues early.

We migrated the test environment first, then production. After each migration, we confirmed in the test environment that the new Workflow started successfully through Nexus before moving to production. Versioning and an environment check gave us that two-stage rollout. That order helped us catch a bug in the old Activity path during testing. Fortunately, we had not switched production in the same change.

Use coding agents to repeat the migration pattern#

Migrating about 70 APIs, each through test and then production, meant about 140 similar diffs. Engineers wrote the first few by hand until the pattern was boring enough to hand off. We captured it in AI skills and let coding agents follow it for the rest, updating the pattern when a new edge case showed up. A migration dashboard to track failures and remaining APIs was as important as the AI-generated code.

When to use Nexus for cross-Namespace calls#

These days, when a Namespace creation goes sideways, the link from the control-plane Workflow takes us straight to the infrastructure Workflow that’s stuck, and nobody has to copy a Workflow ID anywhere. Migrating to Nexus is straightforward if you already have a typed API between Namespaces. For us, the payoff was a cleaner contract between teams and one-click debugging across Namespaces.

Since that first use case, other teams at Temporal have started adopting Nexus too! Nexus looked complicated at first, so we put off trying it. Once we started with Namespace creation, it was easier to get working than we expected, and it made debugging easier right away. If you have a call between Namespaces that’s painful to troubleshoot, give Nexus a try there.

Learn more in the Nexus docs, the Go SDK Nexus guide, and Temporal Nexus is now generally available.

Temporal Cloud

Ready to see for yourself?

Sign up for Temporal Cloud today and get $150 in free credits.

Build invincible applications

It sounds like magic, we promise it's not.