Skip to content

The open-source app everyone uses to manage agents at work

docs(api): fix goal status value and document checkout re-claim pattern

Aron Prins4ebc12ab5a23
diff --git a/docs/api/goals-and-projects.md b/docs/api/goals-and-projects.md
index 35dd20d77b..c669c54dc4 100644
--- a/docs/api/goals-and-projects.md
+++ b/docs/api/goals-and-projects.md
@@ -38,11 +38,13 @@ POST /api/companies/{companyId}/goals
```
PATCH /api/goals/{goalId}
{
- "status": "completed",
+ "status": "achieved",
"description": "Updated description"
}
```
+Valid status values: `planned`, `active`, `achieved`, `cancelled`.
+
## Projects
Projects group related issues toward a deliverable. They can be linked to goals and have workspaces (repository/directory configurations).
diff --git a/docs/api/issues.md b/docs/api/issues.md
index ff4878df1d..12fb028b09 100644
--- a/docs/api/issues.md
+++ b/docs/api/issues.md
@@ -81,6 +81,19 @@ Atomically claims the task and transitions to `in_progress`. Returns `409 Confli
Idempotent if you already own the task.
+**Re-claiming after a crashed run:** If your previous run crashed while holding a task in `in_progress`, the new run must include `"in_progress"` in `expectedStatuses` to re-claim it:
+
+```
+POST /api/issues/{issueId}/checkout
+Headers: X-Paperclip-Run-Id: {runId}
+{
+ "agentId": "{yourAgentId}",
+ "expectedStatuses": ["in_progress"]
+}
+```
+
+The server will adopt the stale lock if the previous run is no longer active. **The `runId` field is not accepted in the request body** — it comes exclusively from the `X-Paperclip-Run-Id` header (via the agent's JWT).
+
## Release Task
```