---
title: "Update session settings"
method: PATCH
path: "/sessions/{id}"
tags: ["Sessions"]
---

# Update session settings

`PATCH /sessions/{id}`

Update session settings such as auto-accept mode or archived status.
Only specified fields will be updated.

## Path parameters

- `id` string, required

## Request body

- UpdateSessionRequest
  - `auto_accept_edits` boolean — Enable/disable auto-accept for edit tools
  - `dangerously_skip_permissions` boolean — Enable or disable dangerously skip permissions mode
  - `dangerously_skip_permissions_timeout_ms` integer, nullable — Optional timeout in milliseconds for dangerously skip permissions mode
  - `archived` boolean — Archive/unarchive the session
  - `title` string — Update session title
  - `model` string — Model to use (opus, sonnet, or empty for default)
  - `model_id` string — Full model identifier
  - `proxy_enabled` boolean — Enable proxy routing for this session
  - `proxy_base_url` string — Base URL for proxy service
  - `proxy_model_override` string — Model identifier for proxy routing
  - `proxy_api_key` string — API key for proxy authentication
  - `additional_directories` string[] — Update additional directories Claude can access
  - `working_dir` string — Update the working directory for the session
  - `editor_state` string — JSON blob of editor state for draft sessions
  - `status` 'draft' | 'starting' | 'running' | 'completed' | 'failed' | 'interrupting' | 'interrupted' | 'waiting_input' | 'discarded' — Current status of the session

## Response `200`

Session updated successfully

- SessionResponse
  - `data` Session, required
    - `id` string, required — Unique session identifier
    - `run_id` string, required — Unique run identifier
    - `claude_session_id` string — Claude's internal session ID
    - `parent_session_id` string — Parent session ID if this is a forked session
    - `status` 'draft' | 'starting' | 'running' | 'completed' | 'failed' | 'interrupting' | 'interrupted' | 'waiting_input' | 'discarded', required — Current status of the session
    - `query` string, required — Initial query that started the session
    - `summary` string — AI-generated summary of the session
    - `title` string — User-editable session title
    - `model` string — Model used for this session
    - `model_id` string — Full model identifier
    - `working_dir` string — Working directory for the session
    - `additional_directories` string[] — Additional directories Claude can access
    - `created_at` string, date-time, required — Session creation timestamp
    - `last_activity_at` string, date-time, required — Last activity timestamp
    - `completed_at` string, date-time, nullable — Session completion timestamp
    - `error_message` string — Error message if session failed
    - `cost_usd` number, float, nullable — Total cost in USD
    - `input_tokens` integer, nullable — Number of input tokens
    - `output_tokens` integer, nullable — Number of output tokens
    - `cache_creation_input_tokens` integer, nullable — Number of cache creation input tokens
    - `cache_read_input_tokens` integer, nullable — Number of cache read input tokens
    - `effective_context_tokens` integer, nullable — Total tokens counting toward context window limit
    - `context_limit` integer, nullable — Context window limit for the model
    - `duration_ms` integer, nullable — Session duration in milliseconds
    - `auto_accept_edits` boolean — Whether edit tools are auto-accepted
    - `dangerously_skip_permissions` boolean — When true, all tool calls are automatically approved without user consent
    - `dangerously_skip_permissions_expires_at` string, date-time, nullable — ISO timestamp when dangerously skip permissions mode expires (optional)
    - `archived` boolean — Whether session is archived
    - `proxy_enabled` boolean — Whether proxy is enabled for this session
    - `proxy_base_url` string — Base URL of the proxy server
    - `proxy_model_override` string — Model to use with the proxy
    - `editor_state` string, nullable — JSON blob of editor state for draft sessions

## Other responses

- `400` — Invalid status transition or validation error
- `404` — Resource not found
- `500` — Internal server error

---

[API](https://skmtc.net/humanlayer/apis/humanlayer-daemon-rest-api.md) · [All operations](https://skmtc.net/humanlayer/apis/humanlayer-daemon-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/humanlayer/humanlayer-daemon-rest-api/versions/02da8cb8aa12/schema)
