session

Diff session turns

Structured per-file diffs of the files a turn changed. A turn runs from the first prompt after the session was last idle until its next idle marker, so prompts steered in while it was busy belong to the same turn; to extends the range through a later turn. Compares the range's first recorded snapshot with its last; a step still running in the active session compares against the working copy. Ranges that span a location change are rejected. In sessions without any idle marker, a prompt's turn spans until the next user message.

get/api/session/{sessionID}/diff

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}/diff
  • Auth: none required

Path parameters

sessionIDstring required

Query parameters

fromstring
tostring
contextstring nullable

Unchanged lines around each hunk. Omit for full-file patches.

Response

Success

Changes

No recorded changes to this operation across all 1 revision of this API.