Set the session's standing goal
POST /v1/chat/sessions/:id/goal — Set a standing goal for the session. Rejected with 400 when a goal is already active or paused — clear it first. `maxTur
POST /v1/chat/sessions/:id/goal
Set a standing goal for the session. Rejected with 400 when a goal is already active or paused — clear it first. maxTurns is the turn budget for one run (defaults to the configured value).
| Method | POST |
| Path | /v1/chat/sessions/:id/goal |
| Auth | Authorization: Bearer <token> required when GATEWAY_AUTH_TOKEN is set |
| Category | chat |
Request body
{ "goalText": "ship the report", "maxTurns": 20 }Response body
{ "ok": true, "goal": { "goalText": "ship the report", "status": "active", "turnsUsed": 0, "maxTurns": 20, "subgoals": [], "lastVerdict": null, "lastReason": null, "pausedReason": null } }