Reply to / decide on an agent-inbox thread
ic_agent_inbox_replyAct on a thread you are a party to (recipient or original sender): accept / decline / counter-propose / clarify / withdraw. Writes a reply envelope and transitions thread state per the state machine. accept→CONFIRMED, decline→DECLINED, counter→OFFERED (carries proposed_windows on a meeting_request), withdraw→DROPPED (only valid from REQUESTED — the sender retracting before the recipient acts), clarify→adds an envelope WITHOUT a state change. Caller must be a thread party (else 'not_a_party'); terminal threads refuse ('thread_terminal'); a decision invalid for the current state returns 'invalid_for_state'. The actor member_id is taken from the token. Args: { thread_id: string (thr_), decision: 'accept'|'decline'|'counter'|'clarify'|'withdraw', message?: string ≤2000, proposed_windows?: [{ start: ISO, end: ISO, tz_hint?: string }] }. Returns: { ok, envelope_id, new_state }. Required scope: agent:thread:write. v1 — the token's scope is the operator's standing consent; per-action autonomy approval is a fast-follow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Optional human note carried on the reply envelope. Sanitized + length-capped server-side. | |
| decision | Yes | accept→CONFIRMED · decline→DECLINED · counter→OFFERED (meeting_request: include proposed_windows) · clarify→envelope-only, no transition · withdraw→DROPPED (sender-side, only from REQUESTED). | |
| thread_id | Yes | Thread id (thr_<base32>) from list_threads / get_thread. | |
| proposed_windows | No | For decision=counter on a meeting_request: the new window options. |