---
title: "Remote-harness relay WebSocket [write]"
method: GET
path: "/sessions/{id}/harness"
---

# Remote-harness relay WebSocket \[write\]

`GET /sessions/{id}/harness`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/harness`
- Auth: HTTP bearer

WebSocket (Upgrade: websocket) served by the chat-proxy. The maker's ACP process connects with `Authorization: Bearer hct_…` (the per-harness connect token minted via `POST /harnesses/{id}/connect-token`). The relay validates the token, then opens a parallel WebSocket to the session's pod and splices both connections together, forwarding newline-delimited JSON-RPC frames in both directions. One live connection per session; a second attempt while one is open returns 409. The session must be ACTIVE and the pod RUNNING. Gated by the `REMOTE_HARNESSES` platform switch (off → 404).

## Path parameters

- `id` string, required

## Response `default`

Error — { error: { code, message, request_id } }

- object
  - `error` object, required
    - `code` string, required: Stable machine-readable condition; branch on this, never on message.
    - `message` string, required: What went wrong and how to fix it, for people. May change.
    - `request_id` string: This request's id (req_…), the same value as the Request-Id header. Quote it when asking for support.

## Other responses

- `101`: Switching Protocols — WebSocket relay open
- `401`: Missing or invalid connect token
- `403`: Token does not belong to this session's harness
- `404`: Session not found or REMOTE_HARNESSES gate is off
- `409`: Session not active, pod not ready, or relay already connected

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/harness/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
