
# Orchestration

JCode orchestration gives a coding agent control of the JCode daemon. The agent can discover every provider and model you have configured, create workspaces, launch other agents, send them follow-ups, and create heartbeats or schedules. The same work stays visible in the JCode app.

## Native subagents vs JCode subagents

The most important difference from native subagents is that **JCode subagents can cross provider boundaries**.

```text
Claude Code (Fable 5) => Codex (GPT-5.6)
Codex (GPT-5.6) => Grok Build
Cursor => Claude Code (Fable 5)
```

Native subagents belong to one provider. Claude Code launches Claude Code subagents; Codex launches Codex subagents. They are useful when the parent provider can handle the whole task itself.

JCode subagents are full agents managed by the JCode daemon. The orchestrator can choose any configured provider and model, keep the worker in the current workspace, or place it in another workspace created for the task. Use them when you want one model to plan, another to implement, and another to review.

|                      | Native subagent                           | JCode subagent                                     |
| -------------------- | ----------------------------------------- | -------------------------------------------------- |
| Provider             | Same provider as its parent               | Any provider configured in JCode                   |
| Working directory    | Managed by the parent provider            | Current or explicitly selected workspace           |
| Lifecycle            | Owned by the parent provider              | Managed by JCode; can receive follow-ups           |
| Where you inspect it | Read-only timeline in the Subagents track | Full agent session in the Subagents track          |
| Best for             | Fast, provider-native delegation          | Cross-provider work and explicit workspace control |

## Try it

Open **Settings → your host → Agents**, then turn on **Enable JCode tools**. Start a new agent, or reload an existing one so it receives the tools.

Then ask naturally:

```text
Stay as the orchestrator. Use JCode to find my available Codex models, then
create a worktree-isolated workspace, then launch a GPT-5.6 subagent there. Ask
it to implement the parser change, run the focused tests, and report back here.
```

The orchestrator discovers the provider and model IDs, starts the worker, and receives a notification when it finishes. You can keep talking to the orchestrator in the meantime.

Agent creation has one default: when an agent creates another agent without a workspace ID, the new agent is its subagent in the same workspace. Passing a workspace ID changes where the subagent works, not who its parent is.

## Where the work appears

Spawned work appears in the **Subagents track** above the composer. Open a row to read the live conversation.

Both kinds of subagent appear there:

- **JCode subagents** open as full agent sessions. You can talk to them directly, change their settings, or archive them.
- **Native provider subagents** open as read-only timelines. You can inspect their work, but their provider owns their lifecycle.

A cross-workspace subagent still belongs to its parent's Subagents track. JCode also opens its workspace so the work is not hidden in an otherwise empty workspace. If you want to turn any subagent into a top-level agent, detach it manually in the app or with `jcode agent detach`; detachment is not an agent-creation mode.

If an agent says background work is running but the track is empty, update JCode. Provider-created subagent timelines require JCode 0.1.107 or newer.

## Keep an agent working with a heartbeat

A heartbeat sends a prompt back into the same agent on a cron cadence. Use one when the agent should keep reassessing a live task: continue a refactor, babysit CI, watch a deployment, or retry after an external system changes.

Ask the agent directly:

```text
Use JCode to create a heartbeat every 10 minutes. Keep checking this PR, fix any
new CI failures, and stop when all checks pass or after two hours.
```

The base [`/jcode` orchestration skill](/docs/skills) teaches agents how to create heartbeats, so you only need to ask. A heartbeat continues the current conversation; a [schedule](/docs/schedules) is better for standalone cron-style jobs such as daily triage.

You do not need to name MCP tools in your prompts. Ask for the workflow; the agent uses the tools underneath.

Continue with [Common workflows](/docs/orchestration-workflows) for copyable prompts, [Orchestration skills](/docs/skills) for packaged workflows, or the [MCP reference](/docs/mcp) for the complete tool catalog.
