You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/cloud-agent-next/README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ The recommended V2 flow is:
56
56
-`prepareSession` - Create a fully prepared session with workspace, git clone, and configuration
57
57
-`updateSession` - Update a prepared (not yet initiated) session
58
58
-`getSession` - Query session metadata (no secrets)
59
+
-`getMessageResult` - Poll lifecycle state and terminal assistant text for one submitted turn
59
60
-`initiateFromKilocodeSessionV2` - Start execution on a prepared session
60
61
-`sendMessageV2` - Send follow-up messages (output via `/stream` WebSocket)
61
62
-`deleteSession` - Delete a session and clean up resources
@@ -67,6 +68,28 @@ The recommended V2 flow is:
67
68
68
69
All endpoints require a kilocode api token except `/stream` which uses short lived ws tickets.
69
70
71
+
### Message Result Retrieval
72
+
73
+
Use the bearer-protected `GET /trpc/getMessageResult` query to poll one durably submitted Cloud Agent turn. Supply `cloudAgentSessionId` and the submitted `messageId`.
74
+
75
+
```text
76
+
GET /trpc/getMessageResult?input={"cloudAgentSessionId":"agent_<uuid>","messageId":"msg_<id>"}
77
+
Authorization: Bearer <kilocode-api-token>
78
+
```
79
+
80
+
The response includes only safe fields: `cloudAgentSessionId`, `messageId`, lifecycle status and timestamps, optional structured `completionSource`, `failure`, `gateResult`, and assistant text correlated to the selected submitted turn. It never returns prompts, tokens, callback details, or raw diagnostics.
81
+
82
+
| Stored lifecycle state | Public status |
83
+
|---|---|
84
+
|`queued`|`queued`|
85
+
|`accepted`|`running`|
86
+
|`completed`|`completed`|
87
+
|`failed`|`failed`|
88
+
|`interrupted`|`interrupted`|
89
+
| Pending-only compatibility row |`queued`|
90
+
91
+
The query returns `NOT_FOUND` for missing sessions, cross-user session lookups, and unknown message IDs.
0 commit comments