---
title: "Background blocking session tools"
method: POST
path: "/api/session/{sessionID}/background"
tags: ["session"]
---

# Background blocking session tools

`POST /api/session/{sessionID}/background`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/session/{sessionID}/background`
- Auth: none required

Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.

## Path parameters

- `sessionID` string, required

## Response `204`

<No Content>

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: SessionNotFoundError

## Changes

> 50 revisions in range; 1 not diffed.

- **2026-10-25** `7565a68e48f6`: 1 breaking, 4 info
  - the response's body type changed from no type to `object` for status `404`
  - removed `#/components/schemas/SessionNotFoundErrorEncoded, #/components/schemas/LocationNotFoundErrorEncoded` from the response body `anyOf` list for the response status `404`
  - added the required property `_tag` to the response with the `404` status
  - added the required property `message` to the response with the `404` status
  - …1 more

[Operation history](https://skmtc.dev/kaaass/apis/opencode/changes/api/session/:sessionID/background/post.md)

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
