Get TraeCN Task
traecn_get_taskRetrieve a gateway task by ID to read its status and final result, or request the full execution trace to diagnose failures. Call once on completion or after reconnecting, not for polling.
Instructions
Read one known gateway task by ID: status plus final result, or the full execution trace with detailLevel 'trace' for diagnosis. Call once when notified of completion or once later when resuming after a disconnect. Not a progress primitive — do not poll in a tight loop.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Stable task identifier returned by traecn_send_message. | |
| detailLevel | No | result returns only the final answer (default); trace includes the full visible Trae execution process. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Stable machine-readable result or error code. | |
| error | No | Original task error, or null when no execution error was recorded. | |
| result | No | Final agent answer payload: text, stable flag, elapsedMs; or code/error when unavailable. | |
| status | No | Task status such as queued, executing, done, error, cancelled, awaiting_review, approval_required. | |
| taskId | No | Echoed task identifier. | |
| changed | No | Whether visible TraeCN state changed. | |
| elapsed | No | Milliseconds elapsed since creation. | |
| message | No | Human-readable outcome summary. | |
| success | No | Whether the operation succeeded. | |
| lastStep | No | Most recent execution step summary (trace level). | |
| metadata | No | Gateway bookkeeping metadata recorded with the task. | |
| createdAt | No | Epoch milliseconds when the task was created. | |
| errorCode | No | Stable code when the task itself failed. | |
| retryable | No | Whether retrying the same call can succeed later. | |
| stepCount | No | Number of recorded execution steps. | |
| nextAction | No | Suggested next step after a failure. | |
| completedAt | No | Task completion time: epoch milliseconds, an ISO 8601 timestamp from persisted history, or null when unavailable. | |
| detailLevel | No | Requested detail level. | |
| fromHistory | No | True when served from persisted history instead of the active queue. | |
| detailWarning | No | Present when trace details could not be fully recovered. | |
| historyStatus | No | Internal history status when the task already left the active queue. | |
| conversationId | No | Stable TraeCN conversation identifier. |