session
Diff session turns
Changed onStructured 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 URLhttps://opencode.ai (the document declares no server; this is the origin it was published from)
- URLhttps://opencode.ai/api/session/{sessionID}/diff
- Authnone required
Path parameters
sessionIDstring required
Query parameters
fromstring
tostring
contextstring nullable
Unchanged lines around each hunk. Omit for full-file patches.
Response
Success
Changes
- info
added the optional property
//to the response with the status
- info