Skip to main content
An agent run started from the API, the CLI or the Claude Connector follows the same Approval mode as a chat in the app. Three things limit it: the token’s scopes, the owner’s workspace role, and the approval mode that applies to the run.

Start a run and get its answer

A chat run asks CloudThinker a question with the token owner’s rights and spends credits. The token needs chat:runs:write. The POST returns 201 at once, usually with status: pending; poll the run until it reaches a final status.
This script stops on the first HTTP error. In production, wrap each call in the retry loop. A workspace runs at most 20 agent runs at once, pending or running; the next POST gets 429 rate_limited. A prompt that contains credentials is refused with 422. To continue the conversation, send its conversation_id in the next POST. See Ask CloudThinker for every field.

What limits an API run

Which approval mode applies

These runs are chat runs, so they use the Chat run type. The mode comes from the first of these that is set:
  1. The mode picked for that conversation
  2. The Chat run type override, under Approvals → Approval mode → Run types
  3. The workspace mode
New workspaces start on Auto · Rules + AI · Ask me. Under Auto, each write goes through your Rules, then AI judgment, and if neither allows it, it waits for a person (Ask me) or is refused (Refuse). See Approval mode for every choice. Rules decide only when Rule enforcement is on for your workspace. It’s off by default: while the Rules step on Approvals says In preview, Rules only record what they would decide, and the Approval mode alone decides each write. See Rules troubleshooting.
Under Auto, a write that a Rule or AI judgment allows runs with no person in the loop, recorded as the token’s owner. Once Rule enforcement is on for your workspace, pick Auto · Rules · Refuse for unattended pipelines, on the conversation or the Chat run type, and accept Allow Rules only for the writes the job needs. While Rules are in preview, no Rule allows anything, so every write under that setting is refused.

When a run pauses

A run waiting for a person has status required_approval. Its url opens the conversation in the browser, where an approver decides. cloudthinker chat exits with code 5. A token with approvals:requests:read can list pending requests from the API, but no token can answer them: approving or rejecting always happens in the app, by a person. This keeps a leaked token from approving its own writes. The polling example above keeps waiting through a pause and prints the approval link once. A script that can’t wait, such as a CI job, can stop at required_approval and report the url instead; the run still continues after a person decides.

Approval mode

Set the mode for the workspace, a run type or one chat.

Rules

Allow, ask first or deny an exact write.