Skip to content

Register a task with a resolution, and start its session when it runs now

POST
/v1/projects/{project_id}/intents
curl --request POST \
--url http://127.0.0.1:8080/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "prompt": "example", "fork_of": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resolution": "merge", "accept_default": true, "route": { "agent": "claude", "auth": "api_key" } }'

The match runs again under a per-project lock (ADR-0006). A new task needs no resolution. Otherwise resolution must be one of the choices the match allows, or accept_default picks the default. When it does not, nothing is stored and the response is 409 with the match in check. An active intent comes with its session and a session token, shown only in this response. A requester’s intent is stored as queued and gets no session.

project_id
required
string format: uuid
Media typeapplication/json
object
prompt
required
string
<= 16384 characters
fork_of
string | null format: uuid
resolution

What to do about the match. Empty for a new task.

Any of:
string
Allowed values: merge queue run_anyway fork join_as_watcher escalate
accept_default

Use the match’s default choice when resolution is empty, as zt start –yes does.

boolean
route

Asks the model router for a model. Only a registration that starts a session is routed.

object
agent
required
string
Allowed values: claude codex opencode
auth

How the user says the agent authenticates. Empty means subscription, which never gets a model. The coordinator reads no credential.

string
Allowed values: api_key subscription ""

Registered.

Media typeapplication/json
object
registered
required
boolean
reason
string
Allowed values: resolution_required resolution_not_allowed
check
required
object
classification
required
string
Allowed values: new partial_overlap already_done active_duplicate
candidates
required
Array<object>
<= 5 items
object
intent_id
required
string format: uuid
status
required
string
Allowed values: active queued done abandoned merged watching escalated
user_handle
required
string
own
required
boolean
session_id
required
string | null format: uuid
ticket_ref
required
string | null
summary
required
string
class
required
string
Allowed values: new partial_overlap already_done active_duplicate
score
required
number
cosine
required

Null when the two intents have no vectors from the same model.

number | null
same_ticket
required
boolean
area_overlap
required
Array<string>
reasons
required
Array<string>
created_at
required
string format: date-time
choices
required
Array<string>
Allowed values: merge queue run_anyway fork join_as_watcher escalate
default_choice
required

The choice a caller may take without asking. Null when the user must decide: an own duplicate, already_done, or a duplicate that only the LLM judge found.

Any of:
string
Allowed values: merge queue run_anyway fork join_as_watcher escalate
degraded
required
boolean
degraded_steps
required
Array<string>
Allowed values: extract embed judge
extraction
required
object
normalized_text
required
string
summary
required
string | null
touched_areas
required
Array<string>
ticket_ref
required
string | null
extractor
required

Heuristic+llm when the LLM extractor added a summary or areas.

string
Allowed values: heuristic heuristic+llm
embedding_model
required
string
dedup_window_hit
required
boolean
intent
required
Any of:
object
id
required
string format: uuid
project_id
required
string format: uuid
user_id
required
string format: uuid
user_handle
required
string
status
required
string
Allowed values: active queued done abandoned merged watching escalated
class
required
string
Allowed values: new partial_overlap already_done active_duplicate
resolution
required
Any of:
string
Allowed values: merge queue run_anyway fork join_as_watcher escalate
matched_intent_id
required
string | null format: uuid
fork_of
required

The root of the fork family.

string | null format: uuid
ticket_ref
required
string | null
touched_areas
required
Array<string>
normalized_text
required
string
summary
required
string | null
embedding_model
required

Null until the intent has a vector.

string | null
extractor
required

Heuristic+llm when the LLM extractor added a summary or areas.

string
Allowed values: heuristic heuristic+llm
degraded_steps
required
Array<string>
session_id
required

The live session, if any.

string | null format: uuid
created_at
required
string format: date-time
ended_at
required
string | null format: date-time
raw_prompt_stored
required
boolean
raw_prompt

Only on a full read, when the coordinator holds the data key.

string
session
required
Any of:
object
id
required
string format: uuid
project_id
required
string format: uuid
user_id
required
string format: uuid
user_handle
required
string
intent_id
required

Set from M2.

string | null format: uuid
status
required
string
Allowed values: starting running waiting_human idle done failed abandoned
activity
required

What the agent last said it is doing, set by a heartbeat. Null until one sets it.

string | null
<= 120 characters
created_at
required
string format: date-time
last_heartbeat_at
required
string format: date-time
ended_at
required
string | null format: date-time
token

The session token, zt_s_. Shown only once.

string
token_info
object
id
required
string format: uuid
kind
required
string
Allowed values: user session admin integration
display_prefix
required

The first characters of the token, safe to show.

string
label
required
string
user_id
string format: uuid
session_id
string format: uuid
project_id
string format: uuid
scopes
required
Array<string>
created_at
required
string format: date-time
expires_at
string format: date-time
last_used_at
string format: date-time
revoked_at
string format: date-time
route

The router’s decision. model is set exactly when the route applies one, and the CLI passes it as the agent’s model flag. tier, rule, and classifier are absent when the router is off or no prompt was there to classify.

object
agent
required
string
Allowed values: claude codex opencode
auth
required
string
Allowed values: api_key subscription
tier
string
Allowed values: cheap frontier
model
string
rule
string
Allowed values: frontier_term long_prompt cheap_term short_prompt default
classifier
string
Allowed values: rules llm
skipped
string
Allowed values: disabled subscription no_model no_prompt

Example

{
"reason": "resolution_required",
"check": {
"classification": "new",
"candidates": [
{
"status": "active",
"class": "new"
}
],
"choices": [
"merge"
],
"default_choice": "merge",
"degraded_steps": [
"extract"
],
"extraction": {
"extractor": "heuristic"
}
},
"intent": {
"status": "active",
"class": "new",
"resolution": "merge",
"extractor": "heuristic"
},
"session": {
"status": "starting"
},
"token_info": {
"kind": "user"
},
"route": {
"agent": "claude",
"auth": "api_key",
"tier": "cheap",
"rule": "frontier_term",
"classifier": "rules",
"skipped": "disabled"
}
}

The request is malformed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The token may not do this.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No such resource in the caller’s org.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Not registered. reason says why and check holds the match.

Media typeapplication/json
object
registered
required
boolean
reason
string
Allowed values: resolution_required resolution_not_allowed
check
required
object
classification
required
string
Allowed values: new partial_overlap already_done active_duplicate
candidates
required
Array<object>
<= 5 items
object
intent_id
required
string format: uuid
status
required
string
Allowed values: active queued done abandoned merged watching escalated
user_handle
required
string
own
required
boolean
session_id
required
string | null format: uuid
ticket_ref
required
string | null
summary
required
string
class
required
string
Allowed values: new partial_overlap already_done active_duplicate
score
required
number
cosine
required

Null when the two intents have no vectors from the same model.

number | null
same_ticket
required
boolean
area_overlap
required
Array<string>
reasons
required
Array<string>
created_at
required
string format: date-time
choices
required
Array<string>
Allowed values: merge queue run_anyway fork join_as_watcher escalate
default_choice
required

The choice a caller may take without asking. Null when the user must decide: an own duplicate, already_done, or a duplicate that only the LLM judge found.

Any of:
string
Allowed values: merge queue run_anyway fork join_as_watcher escalate
degraded
required
boolean
degraded_steps
required
Array<string>
Allowed values: extract embed judge
extraction
required
object
normalized_text
required
string
summary
required
string | null
touched_areas
required
Array<string>
ticket_ref
required
string | null
extractor
required

Heuristic+llm when the LLM extractor added a summary or areas.

string
Allowed values: heuristic heuristic+llm
embedding_model
required
string
dedup_window_hit
required
boolean
intent
required
Any of:
object
id
required
string format: uuid
project_id
required
string format: uuid
user_id
required
string format: uuid
user_handle
required
string
status
required
string
Allowed values: active queued done abandoned merged watching escalated
class
required
string
Allowed values: new partial_overlap already_done active_duplicate
resolution
required
Any of:
string
Allowed values: merge queue run_anyway fork join_as_watcher escalate
matched_intent_id
required
string | null format: uuid
fork_of
required

The root of the fork family.

string | null format: uuid
ticket_ref
required
string | null
touched_areas
required
Array<string>
normalized_text
required
string
summary
required
string | null
embedding_model
required

Null until the intent has a vector.

string | null
extractor
required

Heuristic+llm when the LLM extractor added a summary or areas.

string
Allowed values: heuristic heuristic+llm
degraded_steps
required
Array<string>
session_id
required

The live session, if any.

string | null format: uuid
created_at
required
string format: date-time
ended_at
required
string | null format: date-time
raw_prompt_stored
required
boolean
raw_prompt

Only on a full read, when the coordinator holds the data key.

string
session
required
Any of:
object
id
required
string format: uuid
project_id
required
string format: uuid
user_id
required
string format: uuid
user_handle
required
string
intent_id
required

Set from M2.

string | null format: uuid
status
required
string
Allowed values: starting running waiting_human idle done failed abandoned
activity
required

What the agent last said it is doing, set by a heartbeat. Null until one sets it.

string | null
<= 120 characters
created_at
required
string format: date-time
last_heartbeat_at
required
string format: date-time
ended_at
required
string | null format: date-time
token

The session token, zt_s_. Shown only once.

string
token_info
object
id
required
string format: uuid
kind
required
string
Allowed values: user session admin integration
display_prefix
required

The first characters of the token, safe to show.

string
label
required
string
user_id
string format: uuid
session_id
string format: uuid
project_id
string format: uuid
scopes
required
Array<string>
created_at
required
string format: date-time
expires_at
string format: date-time
last_used_at
string format: date-time
revoked_at
string format: date-time
route

The router’s decision. model is set exactly when the route applies one, and the CLI passes it as the agent’s model flag. tier, rule, and classifier are absent when the router is off or no prompt was there to classify.

object
agent
required
string
Allowed values: claude codex opencode
auth
required
string
Allowed values: api_key subscription
tier
string
Allowed values: cheap frontier
model
string
rule
string
Allowed values: frontier_term long_prompt cheap_term short_prompt default
classifier
string
Allowed values: rules llm
skipped
string
Allowed values: disabled subscription no_model no_prompt

Example

{
"reason": "resolution_required",
"check": {
"classification": "new",
"candidates": [
{
"status": "active",
"class": "new"
}
],
"choices": [
"merge"
],
"default_choice": "merge",
"degraded_steps": [
"extract"
],
"extraction": {
"extractor": "heuristic"
}
},
"intent": {
"status": "active",
"class": "new",
"resolution": "merge",
"extractor": "heuristic"
},
"session": {
"status": "starting"
},
"token_info": {
"kind": "user"
},
"route": {
"agent": "claude",
"auth": "api_key",
"tier": "cheap",
"rule": "frontier_term",
"classifier": "rules",
"skipped": "disabled"
}
}

A rate limit or quota stopped the request. Retry-After gives seconds to wait.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}
Retry-After
integer