# PATCH /v1/sessions/{session_id} - Update session

Source: <https://everruns.com/docs/api/operations/update_session/>

PATCH

/v1/sessions/{session\_id}

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"goal":"Summarize the incident and list remediations","locale":"uk-UA","tags":["resolved"],"title":"Updated session title","virtual_user_id":"identity_01933b5a00007000800000000000001"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request PATCH \
  --url https://app.everruns.com/api/v1/sessions/example \
  --header 'Content-Type: application/json' \
  --data '{ "goal": "Summarize the incident and list remediations", "locale": "uk-UA", "tags": [ "resolved" ], "title": "Updated session title", "virtual_user_id": "identity_01933b5a00007000800000000000001" }'
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID (prefixed, e.g., session\_…)

## Request Bodyrequired

Media typeapplication/json

Request to update a session. Only provided fields will be updated.

object

**goal**

Updated session objective.

string | null

##### Example

```plaintext
Summarize the incident and list remediations
```

**locale**

Session locale (BCP 47, e.g. `uk-UA`).

string | null

##### Example

```plaintext
uk-UA
```

**tags**

Tags for organizing and filtering sessions.

Array\<string> | null

##### Example

```json
[
  "resolved"
]
```

**title**

Human-readable title for the session.

string | null

##### Example

```plaintext
Updated session title
```

**virtual\_user\_id**

Optional resident virtual user used for unattended/background execution.

string | null

##### Example

```plaintext
identity_01933b5a00007000800000000000001
```

## Responses

### 200

Session updated successfully

Media typeapplication/json

Wrapper that adds API and UI links to a serialized resource.

Uses `self_url` (not `url`) for the API link to avoid collision with resources that already have a `url` field (e.g. McpServer). The `allowed_actions` array carries state-aware hypermedia links — empty (and omitted from the wire shape) until the underlying resource opts into the convention by overriding `ResourceUrlable::allowed_actions`.

object

**active\_schedule\_count**

Number of active (enabled) schedules for this session. Populated when the session is fetched for API responses.

integer | null format: int32

**activity**

Outcome-oriented status derived from `status` and the last turn result. This is the value the sessions list groups by and the facet rail counts.

string

Allowed values: running paused failed completed idle

**agent\_id**

ID of the agent working in this session (format: agent\_{32-hex}). Optional.

string | null

**agent\_revision**

Revision of the agent’s history this session started on, when the agent had one. `everruns history show <agent> --revision N` shows the configuration that ran.

integer | null format: int64

**archived\_at**

When this session was archived; `None` means active. Archived sessions are hidden from default list results and shown by opting in (`include_archived=true`). Unlike `is_pinned`, archive is a property of the session itself rather than of the viewer.

string | null format: date-time

**blueprint\_config**

Validated config passed by host at blueprint spawn time. Example: `{"target_repo": "acme/everruns"}`.

object | null

**blueprint\_id**

Blueprint ID. When set, reason\_activity and act\_activity build RuntimeAgent from the blueprint definition instead of from harness\_id/agent\_id.

string | null

**capabilities**

Session-level capabilities (additive to agent capabilities). Applied after agent capabilities when building RuntimeAgent.

Array\<object>

Per-agent capability configuration

Associates a capability with an agent, including optional per-agent configuration. The config field allows the same capability to behave differently per-agent.

object

**config**

Per-agent configuration for this capability (capability-specific)

**ref**

required

Reference to the capability ID

string

**created\_at**

required

Timestamp when the session was created.

string format: date-time

**effective\_owner**

One of:

* object

  Effective human owner summary.

  object

  **id**

  required

  string

  **kind**

  required

  Class of principal that can hold permissions or own resources. `system` is reserved for platform-internal callers and is never minted via the public API.

  string

  Allowed values: user virtual\_user system

  **metadata**

  **subject\_id**

  string | null format: uuid

* null

  null

**event\_count**

Total events recorded for this session (EVE-868). Derived from the session’s event sequence rather than counted, so the session detail tab bar costs no extra scan over `events`. `None` on payloads built outside the database read path.

integer | null format: int32

**features**

Aggregated UI features from all active capabilities (harness + agent + session). Computed at read time from the capability registry. Known features: “file\_system”, “schedules”, “secrets”, “key\_value”, “sql\_database”, “leased\_resources”.

Array\<string>

**file\_count**

Non-directory files in this session’s workspace (EVE-868). Read from `workspaces.file_count`. Counts persisted files only: capability-provided virtual mounts are served from memory and are not included.

integer | null format: int32

**finished\_at**

Timestamp when the session finished (completed or failed).

string | null format: date-time

**forked\_from\_sequence**

Parent event sequence the fork was taken at (the fork point). NULL unless this session is a fork.

integer | null format: int32

**forked\_from\_session\_id**

Session this one was forked from. NULL for sessions that were not forked. Distinct from `parent_session_id` (subagent nesting): forking is a user-initiated “branch from here” relationship.

string | null

**goal**

Session objective visible to the runtime agent at system-prompt level.

string | null

**harness\_id**

required

ID of the harness for this session (format: harness\_{32-hex}).

string

**hints**

Session-level client hints — arbitrary key-value pairs declared by the client at session creation time. These are defaults for every turn; per-message `controls.hints` override these key-by-key (shallow merge).

Examples: `{"setup_connection": true, "rich_media": true}`

object | null

**id**

required

Unique identifier for the session (format: session\_{32-hex}).

string

**initial\_files**

Starting files for a new file tree (additive to agent/harness files). Matching paths override earlier layers. Rejected when attaching workspace\_id.

Array\<object>

Starter file copied into a new session from an agent or harness.

object

**content**

required

File content: plain text or base64-encoded binary.

string

**encoding**

Content encoding: `text` or `base64`.

string

**is\_readonly**

Prevent session-side edits or deletes when true.

boolean

**path**

required

Absolute path within the session workspace. `/workspace` prefix is accepted.

string

**is\_pinned**

Whether this session is pinned by the current user. Only populated when the request has an authenticated user context.

boolean | null

**locale**

Locale for localized agent behavior and formatting (BCP 47, e.g. `uk-UA`).

string | null

**max\_iterations**

Maximum number of LLM iterations per turn for this session.

integer | null

**mcpServers**

Remote MCP servers scoped to this session only.

object

***key***

additional properties

Session-, agent-, or harness-scoped remote MCP server configuration.

This intentionally mirrors the `mcpServers` object shape used by common MCP client config files while staying within Everruns’ current remote-HTTP-only support.

object

**actsAs**

Identity whose grant this attachment requests.

string

Allowed values: none service user user\_or\_service

**args**

Arguments passed to the stdio `command`.

Array\<string>

**auth\_mode**

Authentication mode used when executing tools from this scoped server.

string

Allowed values: none api\_key oauth

**command**

Executable to spawn for a stdio transport server.

string | null

**connectInChat**

Whether a missing sign-in may pause the turn with an in-chat Connect card (`ask`, the default) or fails the call with a settings link (`never`).

string

Allowed values: ask never

**deferred**

Whether the server’s tools are listed only when the model asks for them through tool search (`false`, the default, lists them at turn start).

boolean

**elicitation\_policy**

Which elicitation modes this server may use (`url` by default).

string

Allowed values: url url\_and\_form none

**env**

Environment variables set for the stdio `command`.

object

***key***

additional properties

string

**headers**

Additional HTTP headers sent on MCP requests (HTTP transport only).

object

***key***

additional properties

string

**oauth\_provider\_id**

Provider id used to resolve a user-scoped bearer token.

string | null

**protocol\_mode**

Protocol-era adoption policy for the MCP client (`auto` negotiates).

string

Allowed values: auto 2025-03-26 2025-06-18 2026-07-28

**tool\_discovery**

Whether to discover tool definitions live from this server.

boolean

**tool\_labels**

Risk labels for this server’s tools, by the tool’s own name: `read_only` never asks for approval in the normal mode, `changes` always asks. They win over the tool’s annotations and over a catalog preset’s saved labels. Honored on harness, agent and person-owned servers; dropped from session-scoped servers.

object

***key***

additional properties

A person’s saved risk label for one MCP tool.

Decision (2026-10-10): a person’s label always wins over the tool’s own annotations, because a remote server describes itself and a person who owns the integration knows better. `read_only` also clears `open_world`, since tool approval treats an outward-reaching tool like a destructive one; without that a read-only MCP tool would still ask every time.

string

Allowed values: read\_only changes

**type**

MCP transport type. Only remote HTTP is supported today.

string

Allowed values: http stdio

**url**

URL of the remote MCP server endpoint. Required for HTTP transport; empty/ignored for stdio.

string

**use**

One of:

* string

  Organization catalog preset that supplies transport and authentication policy.

  string

* null

  null

**model\_id**

LLM model ID to use for this session (format: model\_{32-hex}). Overrides the agent’s default model if set.

string | null

**network\_access**

One of:

* object

  Network access list controlling which hosts/URLs this session can reach. Merged with harness and agent layers (allowed: intersect, blocked: union).

  object

  **allowed**

  Allowed host patterns. If non-empty, only matching URLs are permitted. An empty list means “no restriction from this layer” (inherit parent).

  Array\<string>

  **blocked**

  Blocked host patterns. Always denied, even if matched by `allowed`.

  Array\<string>

* null

  null

**organization\_id**

required

Organization this session belongs to (format: org\_{32-hex}).

string

**output\_preview**

Preview text from the last assistant response (truncated).

string | null

**owner**

One of:

* object

  Owning principal summary.

  object

  **id**

  required

  string

  **kind**

  required

  Class of principal that can hold permissions or own resources. `system` is reserved for platform-internal callers and is never minted via the public API.

  string

  Allowed values: user virtual\_user system

  **metadata**

  **subject\_id**

  string | null format: uuid

* null

  null

**owner\_principal\_id**

required

Owning principal for this session.

string

**parallel\_tool\_calls**

Request-level parallel tool calling preference (EVE-598).

`None` (default) preserves provider defaults. `Some(true)` signals the provider that parallel tool calls are wanted; `Some(false)` requests at most one tool call per turn and forces serial execution. Merged across harness/agent/session layers (overlay wins).

boolean | null

**parent\_session\_id**

Parent session that spawned this subagent. NULL for top-level sessions. Used to compute governed subagent delegation depth.

string | null

**playground\_user\_id**

Fixed end-user identity for a Playground conversation; independent of the resident service.

string | null

**preview**

Preview text from the first user message (truncated).

string | null

**resolved\_owner\_user\_id**

Denormalized effective human owner of the owning principal lineage.

string | null format: uuid

**run\_summary**

Generated one-sentence description of what the run did, and where it failed (EVE-867). Absent until a terminal turn has been summarised, and always absent for chat threads and for deployments with no utility LLM, so a reader must have a fallback rather than treating this as required.

string | null

**source**

How this session was started. Server-owned for every ingress path.

string

Allowed values: chat playground api slack ag\_ui fcp schedule webhook a2a eval subagent unknown

**started\_at**

Timestamp when the session started executing.

string | null format: date-time

**status**

required

Current execution status of the session.

string

Allowed values: started active idle waitingfortoolresults paused

**system\_prompt**

Session-level system prompt override. Prepended to the agent’s system prompt when building RuntimeAgent.

string | null

**tags**

Tags for organizing and filtering sessions.

Array\<string>

**task\_count**

Background work owned by this session — subagents, external agents and background tools (EVE-868). Read from `sessions.task_count`. This is what the Work tab holds; `active_schedule_count` describes only the schedules it also lists.

integer | null format: int32

**title**

Human-readable title for the session.

string | null

**tools**

Client-side tools for this session (additive to agent tools).

Array

One of:

* object

  Built-in tool - executed by the worker via ToolRegistry

  object

  **category**

  Category for tool\_search namespace grouping (from parent capability)

  string | null

  **deferrable**

  Whether this tool’s schema can be deferred via tool\_search

  string

  Allowed values: never automatic always

  **description**

  required

  Tool description for LLM

  string

  **display\_name**

  Human-readable display name for UI rendering (e.g., “Get Current Time” for `get_current_time`)

  string | null

  **full\_parameters**

  Original full parameter schema saved by `DeferSchemaHook` before stripping. Serialized only when present so durable reason-to-act scheduling can preserve deferred schemas for `tool_search` in the act phase.

  **hints**

  Semantic hints describing the tool’s behavioral properties

  object

  **capability\_id**

  Capability that contributed this tool definition.

  Reporting uses this attribution only as metadata. It must never contain tool arguments, results, prompts, or any other sensitive payload.

  string | null

  **capability\_name**

  Human-readable capability name snapshot for reporting.

  string | null

  **concurrency\_class**

  Scheduling conflict key. Tool calls within the same act batch that share a non-empty `concurrency_class` are executed sequentially in arrival order; calls in different classes (or with no class) run concurrently.

  Set this on tools that mutate shared session state so that, e.g., two file writes or two SQL mutations in one batch do not race. Read-only tools should leave this `None` so they always parallelize. See `everruns-engine`’s tool scheduler for how the act phase consumes it.

  string | null

  **cpu\_bound**

  Tool performs significant CPU-bound or otherwise non-yielding work in process (e.g. an in-process interpreter). When true, the act scheduler runs the call on its own task (`tokio::spawn`) so a long CPU burst does not starve the cooperative polling of I/O-bound tools in the same batch.

  Distinct from `long_running`, which describes wall-clock time for I/O-bound work (those tools yield at await points and need no offload).

  boolean | null

  **destructive**

  Tool may irreversibly destroy or delete data. Subset of non-readonly — a tool can be non-readonly (writes) without being destructive (e.g., create/update operations).

  boolean | null

  **idempotent**

  Calling the tool repeatedly with the same arguments produces the same effect. Safe to retry on transient failures.

  boolean | null

  **long\_running**

  Tool may take significant time to complete (> \~5s typical). Useful for clients to show progress indicators and set timeouts.

  boolean | null

  **metadata**

  Host-owned annotations that core does not interpret.

  The typed hints above are the vocabulary core itself reasons about. This is the escape hatch for everything a *host* wants to carry alongside a tool — risk tiers for an approval UI, presentation hints, an embedder’s routing keys — without adding a field to core for each one. Core reads nothing here and no driver sends it to a provider; it travels with the definition so a consumer sees it at the point of decision (e.g. a `PreToolUseHook` gating on what the tool declared).

  The schema belongs to whoever writes it. Never put credentials or other sensitive payload here: like the rest of the definition, it is persisted and surfaced to clients.

  **narration\_noun**

  Entity noun for operation-based narration (e.g. “agent”, “harness”). When set, the narration system reads the `operation` argument and produces verb-based narration like “Created agent: Neon Cartographer” instead of the generic “Ran Manage Agents”.

  string | null

  **open\_world**

  Tool interacts with external entities beyond the local system (network calls, third-party APIs, cloud services).

  boolean | null

  **persist\_output**

  Tool output should be persisted to session VFS before truncation. When set, the `tool_output_persistence` capability (EVE-222, EVE-245) writes stdout to `/outputs/{tool_call_id}.stdout` and stderr to `/outputs/{tool_call_id}.stderr`, injecting `full_output`, `total_lines`, and `output_files` into the result.

  boolean | null

  **readonly**

  Tool does not modify any state (read-only queries, lookups). When true: safe to call speculatively, result can be cached.

  boolean | null

  **requires\_secrets**

  Tool requires API keys, credentials, or other secrets to function. Useful for UI to show connection prompts and for LLMs to anticipate authentication failures.

  boolean | null

  **side\_effect\_class**

  One of:

  * string

    Replay-safety class used by the durable Act activity (EVE-530).

    Controls what happens when a worker reclaims a stale `running` claim: `Pure`/`Idempotent` tools are re-executed; `AtMostOnce` tools are settled as `interrupted` to prevent double side-effects.

    `None` is treated conservatively as `AtMostOnce`.

    string

    Allowed values: Pure Idempotent AtMostOnce

  * null

    null

  **stays\_direct**

  Tool must stay a direct tool call and never runs from inside a shell script (`tools_in_shell`): it pauses or shapes the turn, or its result only makes sense to the model directly.

  boolean | null

  **supports\_background**

  Tool supports detached background execution via `spawn_background`. When true, the tool may be executed asynchronously outside the current foreground tool call and report status back later.

  boolean | null

  **name**

  required

  Tool name (used by LLM and for registry lookup)

  string

  **parameters**

  required

  JSON schema for tool parameters

  **policy**

  Tool policy (auto or requires\_approval)

  string

  Allowed values: auto requires\_approval client\_side

  **type**

  required

  string

  Allowed values: builtin

* object

  Replay-safety class used by the durable Act activity (EVE-530).

  Controls what happens when a worker reclaims a stale `running` claim: `Pure`/`Idempotent` tools are re-executed; `AtMostOnce` tools are settled as `interrupted` to prevent double side-effects.

  `None` is treated conservatively as `AtMostOnce`.

  string

  Allowed values: Pure Idempotent AtMostOnce

* string

  null

* null

  Client-side tool - executed by the client, not the server

  object

  **category**

  Category for tool\_search namespace grouping (from parent capability)

  string | null

  **deferrable**

  Whether this tool’s schema can be deferred via tool\_search

  string

  Allowed values: never automatic always

  **description**

  required

  Tool description for LLM

  string

  **display\_name**

  Human-readable display name for UI rendering

  string | null

  **full\_parameters**

  Original full parameter schema saved by `DeferSchemaHook` before stripping. Serialized only when present so durable reason-to-act scheduling can preserve deferred schemas for `tool_search` in the act phase.

  **hints**

  Semantic hints describing the tool’s behavioral properties

  object

  **capability\_id**

  Capability that contributed this tool definition.

  Reporting uses this attribution only as metadata. It must never contain tool arguments, results, prompts, or any other sensitive payload.

  string | null

  **capability\_name**

  Human-readable capability name snapshot for reporting.

  string | null

  **concurrency\_class**

  Scheduling conflict key. Tool calls within the same act batch that share a non-empty `concurrency_class` are executed sequentially in arrival order; calls in different classes (or with no class) run concurrently.

  Set this on tools that mutate shared session state so that, e.g., two file writes or two SQL mutations in one batch do not race. Read-only tools should leave this `None` so they always parallelize. See `everruns-engine`’s tool scheduler for how the act phase consumes it.

  string | null

  **cpu\_bound**

  Tool performs significant CPU-bound or otherwise non-yielding work in process (e.g. an in-process interpreter). When true, the act scheduler runs the call on its own task (`tokio::spawn`) so a long CPU burst does not starve the cooperative polling of I/O-bound tools in the same batch.

  Distinct from `long_running`, which describes wall-clock time for I/O-bound work (those tools yield at await points and need no offload).

  boolean | null

  **destructive**

  Tool may irreversibly destroy or delete data. Subset of non-readonly — a tool can be non-readonly (writes) without being destructive (e.g., create/update operations).

  boolean | null

  **idempotent**

  Calling the tool repeatedly with the same arguments produces the same effect. Safe to retry on transient failures.

  boolean | null

  **long\_running**

  Tool may take significant time to complete (> \~5s typical). Useful for clients to show progress indicators and set timeouts.

  boolean | null

  **metadata**

  Host-owned annotations that core does not interpret.

  The typed hints above are the vocabulary core itself reasons about. This is the escape hatch for everything a *host* wants to carry alongside a tool — risk tiers for an approval UI, presentation hints, an embedder’s routing keys — without adding a field to core for each one. Core reads nothing here and no driver sends it to a provider; it travels with the definition so a consumer sees it at the point of decision (e.g. a `PreToolUseHook` gating on what the tool declared).

  The schema belongs to whoever writes it. Never put credentials or other sensitive payload here: like the rest of the definition, it is persisted and surfaced to clients.

  **narration\_noun**

  Entity noun for operation-based narration (e.g. “agent”, “harness”). When set, the narration system reads the `operation` argument and produces verb-based narration like “Created agent: Neon Cartographer” instead of the generic “Ran Manage Agents”.

  string | null

  **open\_world**

  Tool interacts with external entities beyond the local system (network calls, third-party APIs, cloud services).

  boolean | null

  **persist\_output**

  Tool output should be persisted to session VFS before truncation. When set, the `tool_output_persistence` capability (EVE-222, EVE-245) writes stdout to `/outputs/{tool_call_id}.stdout` and stderr to `/outputs/{tool_call_id}.stderr`, injecting `full_output`, `total_lines`, and `output_files` into the result.

  boolean | null

  **readonly**

  Tool does not modify any state (read-only queries, lookups). When true: safe to call speculatively, result can be cached.

  boolean | null

  **requires\_secrets**

  Tool requires API keys, credentials, or other secrets to function. Useful for UI to show connection prompts and for LLMs to anticipate authentication failures.

  boolean | null

  **side\_effect\_class**

  One of:

  * string

    Replay-safety class used by the durable Act activity (EVE-530).

    Controls what happens when a worker reclaims a stale `running` claim: `Pure`/`Idempotent` tools are re-executed; `AtMostOnce` tools are settled as `interrupted` to prevent double side-effects.

    `None` is treated conservatively as `AtMostOnce`.

    string

    Allowed values: Pure Idempotent AtMostOnce

  * null

    null

  **stays\_direct**

  Tool must stay a direct tool call and never runs from inside a shell script (`tools_in_shell`): it pauses or shapes the turn, or its result only makes sense to the model directly.

  boolean | null

  **supports\_background**

  Tool supports detached background execution via `spawn_background`. When true, the tool may be executed asynchronously outside the current foreground tool call and report status back later.

  boolean | null

  **name**

  required

  Tool name (used by LLM and for correlation)

  string

  **parameters**

  required

  JSON schema for tool parameters

  **type**

  required

  string

  Allowed values: client\_side

* string

  Replay-safety class used by the durable Act activity (EVE-530).

  Controls what happens when a worker reclaims a stale `running` claim: `Pure`/`Idempotent` tools are re-executed; `AtMostOnce` tools are settled as `interrupted` to prevent double side-effects.

  `None` is treated conservatively as `AtMostOnce`.

  string

  Allowed values: Pure Idempotent AtMostOnce

* null

  null

**updated\_at**

required

Timestamp when the session was last updated.

string format: date-time

**usage**

One of:

* object

  Cumulative token usage for all LLM calls in this session.

  object

  **actual\_cost\_usd**

  Actual cost of this generation in USD, as reported by the provider inline (e.g. OpenRouter’s `usage.cost`, which reflects real post-routing/BYOK/cache pricing). `None` for providers that do not return a cost.

  number | null format: double

  **cache\_creation\_tokens**

  Number of tokens written to cache, disjoint from `input_tokens`

  integer | null format: int32

  **cache\_read\_tokens**

  Number of tokens read from cache (reduces cost), disjoint from `input_tokens`

  integer | null format: int32

  **effective\_cost\_usd**

  Best-effort USD cost when it cannot be derived from actual/estimated alone: already-aggregated usage, or a generation carrying a cost that belongs to neither slot. Per-generation usage normally leaves this unset and derives the effective cost from actual-else-estimated; the exception is a turn whose compaction cost is folded in, where the combined total has to live here precisely so the generation’s own actual-vs-estimated distinction survives (EVE-895).

  number | null format: double

  **estimated\_cost\_usd**

  Estimated cost of this generation in USD, derived from the model’s static price-table profile. Computed whenever a profile with cost data exists, independently of `actual_cost_usd`, so estimate-vs-actual drift can be reconciled. `None` when there is no profile cost data for the model.

  number | null format: double

  **input\_tokens**

  required

  Number of non-cached prompt tokens (cached reads/writes are tracked separately; see the disjoint bucket convention on the struct)

  integer format: int32

  **output\_tokens**

  required

  Number of output/completion tokens

  integer format: int32

* null

  null

**virtual\_user\_id**

Optional resident virtual user for unattended/background execution.

string | null

**workspace\_id**

required

Workspace this session is attached to (format: wsp\_{32-hex}). Owns the session’s virtual filesystem. For the default 1:1 case this mirrors the session id, but clients should read it here rather than deriving it.

string

**allowed\_actions**

State-aware hypermedia actions the caller can take on this resource next (e.g. `cancel`, `events`, `update`). Omitted from the wire shape when empty so resources that haven’t opted into the convention don’t grow their payloads.

Array\<object>

Agent-actionable link describing a follow-up the caller can take. Used in two contexts:

* **Error recovery** — `ErrorResponse.allowed_actions` carries `rel`s like `retry`, `retry-later`, `unarchive`, `get-existing` so the agent knows the right next call after a 4xx/429.
* **Entity hypermedia** — `WithUrls<T>.allowed_actions` carries state-aware `rel`s like `cancel`, `events`, `self`, `update` on the entity itself so the agent can follow links instead of reconstructing routes from prose.

The shape is intentionally identical across both contexts; the closed `rel` vocabulary distinguishes them.

object

**hint**

Short, agent-readable hint (e.g. “Shorten ‘name’ to <= 200 chars.”, “Cancel the active turn for this session.”).

string | null

**href**

Absolute (preferred) or relative URL the caller may invoke directly. **Always present on entity hypermedia actions** (`WithUrls<T>.allowed_actions`); **optional on error-recovery actions** (`ErrorResponse.allowed_actions`) where the matching `operation_id` is enough and the URI is implicit from the failed call.

string | null

**method**

HTTP method to use against `href`. Required for entity hypermedia actions; usually omitted on error-recovery actions where the same operation is retried with its original method.

string | null

**operation\_id**

OpenAPI `operationId` the caller should invoke. Lets an MCP client resolve the call without parsing `href`.

string | null

**rel**

required

Link relation describing the action. Examples: `self`, `cancel`, `pause`, `resume`, `events`, `retry`, `retry-later`, `unarchive`, `get-existing`, `delete`, `update`.

string

**schema\_ref**

OpenAPI `$ref` to the request-body schema, when the action takes one (e.g. `#/components/schemas/UpdateSessionRequest`). Lets a tool-calling agent fetch the input shape without scanning the whole spec.

string | null

**self\_url**

required

Full API endpoint URL for this resource.

string

**ui\_link**

required

Alias for `view_url`, used by command and MCP outputs.

string

**view\_url**

required

Full UI URL for viewing this resource.

string

##### Example

```json
{
  "active_schedule_count": 2,
  "activity": "running",
  "agent_id": "agent_01933b5a00007000800000000000001",
  "agent_revision": 4,
  "archived_at": "2026-05-25T10:14:32Z",
  "blueprint_id": "blueprint_research_pack",
  "created_at": "2026-05-25T10:00:00Z",
  "effective_owner": {
    "id": "principal_01933b5a000070008000000000000001",
    "kind": "user"
  },
  "event_count": 42,
  "features": [
    "file_system",
    "secrets"
  ],
  "file_count": 6,
  "finished_at": "2026-05-25T10:14:32Z",
  "forked_from_sequence": 42,
  "goal": "Investigate the queue latency regression",
  "harness_id": "harness_01933b5a00007000800000000000001",
  "id": "session_01933b5a00007000800000000000001",
  "is_pinned": false,
  "locale": "en-US",
  "max_iterations": 50,
  "mcpServers": {
    "additionalProperty": {
      "actsAs": "none",
      "auth_mode": "none",
      "connectInChat": "ask",
      "elicitation_policy": "url",
      "protocol_mode": "auto",
      "tool_labels": {
        "additionalProperty": "read_only"
      },
      "type": "http",
      "use": "catalog:linear"
    }
  },
  "model_id": "model_01933b5a00007000800000000000001",
  "network_access": {
    "allowed": [
      "*.example.com",
      "https://api.acme.com/"
    ],
    "blocked": [
      "169.254.169.254"
    ]
  },
  "organization_id": "org_00000000000000000000000000000001",
  "output_preview": "Here is a Q3 plan covering the three pillars we discussed...",
  "owner": {
    "id": "principal_01933b5a000070008000000000000001",
    "kind": "user"
  },
  "owner_principal_id": "principal_01933b5a000070008000000000000001",
  "parallel_tool_calls": true,
  "preview": "Help me draft the Q3 marketing plan",
  "resolved_owner_user_id": "550e8400-e29b-41d4-a716-446655440000",
  "run_summary": "Ran the nightly report and failed posting it to Slack: channel_not_found.",
  "source": "chat",
  "started_at": "2026-05-25T10:00:01Z",
  "status": "started",
  "tags": [
    "marketing",
    "q3",
    "draft"
  ],
  "task_count": 3,
  "title": "Q3 marketing brief",
  "tools": [
    {
      "deferrable": "never",
      "hints": {
        "side_effect_class": "Pure"
      },
      "policy": "auto",
      "type": "builtin"
    }
  ],
  "updated_at": "2026-05-25T10:14:32Z",
  "virtual_user_id": "identity_01933b5a00007000800000000000001",
  "workspace_id": "wsp_01933b5a00007000800000000000001",
  "allowed_actions": [
    {
      "method": "POST"
    }
  ]
}
```

### 400

Invalid session ID

### 404

Session not found

### 500

Internal server error