Skip to content

Get the reviewer's decision context for a review (BYO review-agent plane)

GET
/v1/reviews/{id}/decision-context

The reviewer’s read-only decision surface (D5; §9): the intent + current draft + the append-only thread + the two-circuit-breaker budget (hop_count vs max_hops, and the hard review_deadline). The reviewer is an AGENT granted review:act, authorized for THIS review ONLY via a matching ACTIVE review_link (per-inbox beats account-wide); review:act alone is necessary, not sufficient. force_to_human is true when EITHER breaker has tripped; the reviewer’s next reject would be FORCED to the human regardless of intent (the human is the only terminal authority, D17). A cross-tenant id is 404 (no existence leak); a non-reviewer is 403. No mutation, no LLM.

id
required
string

Ok

The reviewer’s read-only decision surface for a review (D5; §9): the intent + current draft + thread + the two-circuit-breaker budget. force_to_human is true when EITHER breaker has tripped (hop_count ≥ max_hops, or the hard review_deadline); the reviewer’s next reject would be FORCED to the human regardless of intent (the human is the only terminal authority, D17).

object
review
required

A review request (rr_…); the server-owned pre-send record of a message under the Review Loop. Carries intent, the current proposed draft, category, state machine fields, and (once sent) the sent body + diff.

object
id
required
string
state
required
string
Allowed values: needs_review in_review chatting stale approved sent auto_sent rejected stalled cancelled failed
mode
required
string
Allowed values: review direct
effective_mode
required
string
Allowed values: review direct
kind
required
string
Allowed values: send reply forward
from_address
string
agent_id
string
category_id
string
intent_summary
string
intent_meta
object
key
additional properties
any
revision
required
integer
version
required
integer
proposed_subject
string
proposed_body_text
string
proposed_body_html
string
proposed_to
Array<string>
proposed_cc
Array<string>
proposed_bcc
Array<string>
sent_subject
string
sent_body_text
string
diff_unified
string
sent_message_id
string
gate_outcome
string
stale_reason
string
decision_feedback
string
closed

True once this review will never move again; sent, auto_sent, cancelled OR failed. It is the definitive per-review “am I done?” answer and the poll-side companion to the terminal review events; use it after a restart when your event cursor is gone. failed is included deliberately: nothing re-approves a failed review, so treating it as open means waiting forever.

boolean
send_error

Vendor-scrubbed delivery failure, present on a failed review.

string
send_path

How the message was released, once sent.

string
Allowed values: human_reviewed reviewer_approved graduated_auto agent_direct
created_at
string format: date-time
updated_at
string format: date-time
decided_at
string format: date-time
sent_at
string format: date-time
turns
required
Array<object>

One immutable turn in a review’s append-only thread (turn_…).

object
id
required
string
seq
required
integer
turn_type
required
string
Allowed values: agent_draft agent_question agent_note human_comment human_question human_edit human_approve human_reject human_reconfirm system_diff state_change nudge
actor_kind
required
string
Allowed values: agent human review_agent system
actor_id
string
body
string
revision
integer
diff_json
object
key
additional properties
any
metadata
object
key
additional properties
any
created_at
required
string format: date-time
hop_count
required

Circuit breaker (a): reviewer hand-backs so far.

integer
max_hops
required

Circuit breaker (a): the ceiling; at hop_count ≥ max_hops the next action is forced to the human.

integer
review_deadline
required

Circuit breaker (b): the hard per-review wall-clock deadline (created_at + review_deadline_s).

string format: date-time
deadline_passed
required

Breaker (b) tripped: now ≥ review_deadline.

boolean
hops_exhausted
required

Breaker (a) tripped: hop_count ≥ max_hops.

boolean
force_to_human
required

Either breaker tripped: a reject is overridden to a human escalation.

boolean
force_reason

The tripped breaker (max_hops_reached | review_deadline_passed).

string

Missing or invalid credential.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Authenticated but lacking the required scope, or out of quota.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Resource not found.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope