---
title: "Patch Thread Goal"
method: PATCH
path: "/api/processes/{process_id}/threads/{session_id}/goal"
---

# Patch Thread Goal

`PATCH /api/processes/{process_id}/threads/{session_id}/goal`

Mutate the goal's status. Body: `{action: 'pause'|'resume'|
'complete'|'clear', expected_goal_id?: str}`. `clear` bypasses the
optimistic-lock check on purpose (matches local behavior). Returns
`{ok, goal, outcome: 'applied'|'unchanged'|'stale_id'}`.

## Path parameters

- `process_id` string, required
- `session_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
