Needs
An agent tells its person it is blocked on them; the person replies or dismisses it.
List needs
The session's needs, oldest first - the open ones by default; with number, one need and its reply.
Owner and members. An agent reads the person's answer here: number names the need it raised, whatever its state, and the answer carries state answered with reply, dismissed, or cleared (the session ended).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
state | string | Optional | |
number | integer | Optional | |
cursor | string | Optional | |
limit | integer | Optional |
Response
datadata[].actor- who raised it as a person reads it: Claude Code · Lucas; Ciresk dev for expiring and budget
data[].agent- the agent identity and harness, as the audit names it
data[].kind- One of
question,approval,failing_check,expiring,budget data[].linkdata[].number- the seq of its need.raised event
data[].person- the person it is addressed to, user:<id>
data[].raised_atdata[].raised_by- the requester's subject: agent:<id>, user:<id>, a service, or dev-api
data[].replydata[].resolved_atdata[].resolved_bydata[].session_iddata[].state- cleared: the session ended while it was openOne of
open,answered,dismissed,cleared data[].texthas_morenext_cursor
curl "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/needs" \
-H "Authorization: Bearer $CIRESK_KEY"Raise a need
Tell the person the agent is blocked on them - a question, an approval, a failing check it cannot fix.
"Needs you". The owner or a member with use, or their agent, raises it; it is addressed to the caller's accountable person (an agent's owner; a service's goes to the session's owner) and names its actor as a person reads it, "Claude Code · Lucas", from the Ciresk-Agent header and the directory. Appends an inbound need.raised event, whose seq is the need's number, and counts it in the session's needs_open. text is one line of at most 280 characters (control characters become spaces); link is one url or reference, e.g. exec:<id> or a CI job url. On by default with no switch to turn it off; at most 10 raises per session per hour (429 rate_limited with Retry-After). The same kind and text while that need is open returns it (200) instead of raising it twice. dev raises kind expiring itself, lifetime_warning_secs before the session's max lifetime, and kind budget when the session's budget will stop it (Budget); neither counts towards the limit. 409 session_not_running on an ended session.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
Request body
kind- One of
question,approval,failing_check link- one url or reference without spaces: exec:<id>, evidence:<path>, a CI job url
text- one line the person reads at a glance; control characters become spaces
Response
actor- who raised it as a person reads it: Claude Code · Lucas; Ciresk dev for expiring and budget
agent- the agent identity and harness, as the audit names it
kind- One of
question,approval,failing_check,expiring,budget linknumber- the seq of its need.raised event
person- the person it is addressed to, user:<id>
raised_atraised_by- the requester's subject: agent:<id>, user:<id>, a service, or dev-api
replyresolved_atresolved_bysession_idstate- cleared: the session ended while it was openOne of
open,answered,dismissed,cleared text
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/needs" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "question",
"link": "https://ci.eu.ciresk.com/jobs/job_0109badfc220cd056b2c0e862ac73d40",
"text": "Go ahead."
}'Dismiss a need
Close a need unanswered - the person, the session's owner, or the person's agent withdrawing it.
The person the need is addressed to or the session's owner, or an agent acting for them, else 403 not_allowed. Appends an inbound need.dismissed event. Dismissing a dismissed need returns it.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
number | integer | Required | the need's number, the seq of its need.raised event |
Response
actor- who raised it as a person reads it: Claude Code · Lucas; Ciresk dev for expiring and budget
agent- the agent identity and harness, as the audit names it
kind- One of
question,approval,failing_check,expiring,budget linknumber- the seq of its need.raised event
person- the person it is addressed to, user:<id>
raised_atraised_by- the requester's subject: agent:<id>, user:<id>, a service, or dev-api
replyresolved_atresolved_bysession_idstate- cleared: the session ended while it was openOne of
open,answered,dismissed,cleared text
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/needs/d5189743-c854-4635-9d15-741eb6923d0a/dismiss" \
-H "Authorization: Bearer $CIRESK_KEY"Reply to a need
The person answers a need; the agent reads the reply through dev.sessions.needs.list.
A person only, the one the need is addressed to or the session's owner, else 403 not_allowed; an agent never answers a need. Appends an inbound need.answered event with the reply (at most 2,000 characters, lines kept). The same reply again returns the answered need; another one is 409 need_not_open.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | Required | The session's ID. |
number | integer | Required | the need's number, the seq of its need.raised event |
Request body
reply
Response
actor- who raised it as a person reads it: Claude Code · Lucas; Ciresk dev for expiring and budget
agent- the agent identity and harness, as the audit names it
kind- One of
question,approval,failing_check,expiring,budget linknumber- the seq of its need.raised event
person- the person it is addressed to, user:<id>
raised_atraised_by- the requester's subject: agent:<id>, user:<id>, a service, or dev-api
replyresolved_atresolved_bysession_idstate- cleared: the session ended while it was openOne of
open,answered,dismissed,cleared text
curl -X POST "$CIRESK_API/v1/dev/sessions/devs_0166ba8e973a3df1b173b30df1cb8f2f/needs/d5189743-c854-4635-9d15-741eb6923d0a/reply" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"reply": "Go ahead."
}'