# April 10, 2026 Update

Since the [last update](/content/blog/april-3-2026-update/index.html), we shipped **2 releases** and **19 commits** across the SDK. This week is mostly about making [Agentuity Coder](/content/blog/march-6-2026-update#agentuity-coder/index.html) easier to plug into real workflows. You can stream sessions live from the SDK, choose which agents are available, and jump back into paused cloud sessions more smoothly.

## Overview

- _Real-time Coder clients_ for [WebSocket](https://agentuity.dev/routes/websockets) and [SSE](https://agentuity.dev/routes/sse) in `@agentuity/coder`
- _Custom agents and rosters_ with `defaultAgent`, `enabledAgents`, and first-class SDK methods
- _Smoother remote attach_ with auto-resume and an optional local project path for `agentuity coder start`
- _Broader docs coverage_ across the Coder service, CLI, SDK, and HTTP API
- [And more!](/content/blog/april-10-2026-update#also-shipping/index.html)

## Real-Time Coder Clients

The standalone [`@agentuity/coder`](https://agentuity.dev/reference/standalone-packages#coder) package now ships with real-time transports for Coder sessions. Use [WebSocket](https://agentuity.dev/routes/websockets) when you want control, and [SSE](https://agentuity.dev/routes/sse) when you want a live stream of session activity. For the Coder-specific client surface, check the [Coder SDK reference](https://agentuity.dev/reference/sdk-reference/coder).

If you're building your own workflow or integration on top of [Coder](https://agentuity.dev/services/coder), this removes a lot of setup work. You can now watch or steer [sandbox-backed](/content/product/sandboxes/index.html) sessions from your own app without wiring up the real-time connection yourself.

Here's the shape of it:

```
import {
  CoderHubWebSocketClient,
  type ServerMessage,
} from '@agentuity/coder';

// Pick the session you want to observe
const sessionId: string = 'codesess_abc123';

// Connect as an observer so you receive live updates without taking control
const client = new CoderHubWebSocketClient({
  sessionId,
  role: 'observer',
  onMessage: (message: ServerMessage) => {
    if (message.type === 'broadcast') {
      // Broadcast events carry the session activity you want to react to
      console.log(message.event, message.data);
    }
  },
});

// Open the real-time connection
client.connect();
```

Alongside `CoderHubWebSocketClient`, the package also exports `subscribeToCoderHub()`, `CoderSSEClient`, and `streamCoderSessionSSE()`. Between the HTTP client, WebSocket transport, and SSE stream, the package now covers both session management and live observation in one place.

## Custom Agents and Roster Controls

Custom agents also got more first-class support. `CoderClient` can now list, create, update, publish, archive, and version them directly, and you can carry an explicit roster into sessions and workspaces.

That means you can:

- Choose which built-in or custom agents are available for a workflow
- Set a `defaultAgent` up front
- Keep the same lineup attached to a reusable workspace

For teams leaning into companion agents and org-specific specialists, that makes Coder feel much more intentional.

Here's a simple session setup with an explicit roster:

```
import {
  CoderClient,
  type CoderCreateSessionRequest,
} from '@agentuity/coder';

// Reuse one client for session creation and follow-up calls
const client = new CoderClient();

// Define the session's task, preferred default agent, and allowed roster
const request: CoderCreateSessionRequest = {
  task: 'Investigate the latest QA failure and summarize next steps',
  // Route top-level prompts to the QA agent by default
  defaultAgent: 'qa-team',
  // Limit the session to the agents you want available
  enabledAgents: ['qa-team', 'reviewer', 'browser-qa'],
  workspaceId: 'ws_qa',
  tags: ['qa', 'incident'],
};

// Create the session and keep the returned ID for later API calls
const session = await client.createSession(request);
console.log(session.sessionId);
```

The CLI picked up the same model. You can now pass `--default-agent` and `--enabled-agents` when creating or updating sessions, and `coder workspace create` also accepts `--enabled-agents` for workspace-level defaults.

## Smoother Remote Attach

Remote attach is more reliable now. If a paused sandbox session can be resumed, the SDK and CLI will wake it up before trying to attach.

On the SDK side, `prepareSessionForRemoteAttach()` now resumes wakeable sessions and polls until the runtime is available again. On the CLI side, `agentuity coder start --remote <session-id>` follows the same flow, so reconnecting to a paused session feels more like "resume and attach" than "hope it's still warm."

Small but useful: `agentuity coder start` now accepts `--dir`, so you can launch the local TUI against a specific repo without `cd`-ing there first.

```
# Reconnect to a paused sandbox session
agentuity coder start --remote codesess_abc123

# Start the local TUI from a specific project directory
agentuity coder start --dir ~/repos/website-cf
```

## Also Shipping

- **OAuth schemas**: `is_public` now flows through the OIDC client schemas and matches the current [OAuth API](https://agentuity.dev/reference/api/oauth).
- **WebRTC fix**: frontend clients now avoid duplicate offers during renegotiation.
- **Coder docs**: dedicated references for the [service](https://agentuity.dev/services/coder), [CLI](https://agentuity.dev/reference/cli/coder), [SDK](https://agentuity.dev/reference/sdk-reference/coder), and [HTTP API](https://agentuity.dev/reference/api/coder), plus follow-up v2 docs fixes.
- **More polish**: several examples and runtime types were tightened up to better match current v2 behavior.

## Upgrade Now

The CLI will prompt you automatically when a new version is available, or you can upgrade manually:

```
agentuity upgrade
bun add @agentuity/coder@latest
```

New to Agentuity? Get started in seconds:

```
curl -fsSL https://agentuity.sh | sh
```

Once you're upgraded:

- Watch live sessions with `streamCoderSessionSSE()` or `CoderHubWebSocketClient`
- Set `enabledAgents` and `defaultAgent` when creating sessions
- Reattach to paused sessions with `agentuity coder start --remote`
