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
selectedOutputs was artificially stream-only: a sync run rejected it with a
400 and pointed at a second call (runs get) that resolves block ids only.
The sync path already holds the full execution result, so selection now
answers in the same response: blockOutputs keyed by the request's selector
strings, names resolved against the exact state being run, absent paths
omitted, failed and timed-out runs including the blocks that did run, values
compacted like output. Route guard deleted, resume sends null, contract +
openapi + cli-api + cli-docs regenerated, CLI --select-output works on a
plain sync run (only --async still rejects it, locally, with the dialect
hint).
New agent-cli augmentation: logs query <workflowId> --block <name>
[--field <path>] [--where <path>=<value>] [--status] [--trigger] [--limit]
— one row per run across run history, recursive span walk, last match per
run wins. The augmentation layer gains command-local flag parsing
(--flag value / --flag=value / bare) to support it; positional-only
commands are unchanged.
Autopsy fix: the formatter neutral-path workaround from the display-frames
commit dropped the caller's extension, so generate:openapi (JSON) aborted
with a biome parse error while .ts generators stayed green. The extension
now survives; regression test added and wired into test:generators.
Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/reference.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5157,7 +5157,7 @@ sim workflows run <workflowId> [options]
5157
5157
|`--input <json\|@file>`| No | Trigger input as JSON (JSON, or @path / @- to read a file or stdin). |
5158
5158
|`--async`| No | Queue the run and return immediately. |
5159
5159
|`--execution-timeout-seconds <value>`| No | Requested server-side timeout for an asynchronous run, in seconds. An upper bound, not the effective timeout: the run uses the smaller of this value and the plan's execution timeout, so requesting more than the plan allows silently yields the plan timeout. Rejected with `400` unless `async` is true. |
5160
-
|`--select-output <value...>`| No | Return blockName.field values from the streamed result (e.g. agent_1.content), requires --follow; missing fields are omitted (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
5160
+
|`--select-output <value...>`| No | Return blockName.field values (e.g. agent_1.content) — in blockOutputs on a sync run, or from the streamed result with --follow; missing fields are omitted. Not available with --async (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
5161
5161
|`--include-file-base64`| No | Inline eligible output files as base64 content. Rejected when `async` is true. |
5162
5162
|`--no-include-file-base64`| No | Send --include-file-base64 as false. |
5163
5163
|`--base64-max-bytes <value>`| No | Maximum total bytes of file content to inline as base64, lowering but never raising the server limit of 16 MiB. Rejected when `async` is true. |
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/workflows.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -532,7 +532,7 @@ sim workflows run <workflowId> [options]
532
532
|`--input <json\|@file>`| No | Trigger input as JSON (JSON, or @path / @- to read a file or stdin). |
533
533
|`--async`| No | Queue the run and return immediately. |
534
534
|`--execution-timeout-seconds <value>`| No | Requested server-side timeout for an asynchronous run, in seconds. An upper bound, not the effective timeout: the run uses the smaller of this value and the plan's execution timeout, so requesting more than the plan allows silently yields the plan timeout. Rejected with `400` unless `async` is true. |
535
-
|`--select-output <value...>`| No | Return blockName.field values from the streamed result (e.g. agent_1.content), requires --follow; missing fields are omitted (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
535
+
|`--select-output <value...>`| No | Return blockName.field values (e.g. agent_1.content) — in blockOutputs on a sync run, or from the streamed result with --follow; missing fields are omitted. Not available with --async (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
536
536
|`--include-file-base64`| No | Inline eligible output files as base64 content. Rejected when `async` is true. |
537
537
|`--no-include-file-base64`| No | Send --include-file-base64 as false. |
538
538
|`--base64-max-bytes <value>`| No | Maximum total bytes of file content to inline as base64, lowering but never raising the server limit of 16 MiB. Rejected when `async` is true. |
"description": "What kind of entity the reference was expected to name."
5174
5181
},
5175
5182
"reason": {
@@ -9094,6 +9101,23 @@
9094
9101
"output": {
9095
9102
"description": "Workflow output, including partial output on failure."
9096
9103
},
9104
+
"blockOutputs": {
9105
+
"anyOf": [
9106
+
{
9107
+
"type": "object",
9108
+
"propertyNames": {
9109
+
"type": "string"
9110
+
},
9111
+
"additionalProperties": {
9112
+
"description": "Output value produced by one workflow block."
9113
+
}
9114
+
},
9115
+
{
9116
+
"type": "null"
9117
+
}
9118
+
],
9119
+
"description": "Outputs of the blocks named by `selectedOutputs`, keyed by those selector strings, or null when none were requested. Selectors whose block did not run or whose path is absent are omitted; failed runs include the outputs of the blocks that did run."
"description": "Synchronous workflow run output and in-band execution status. Run failures are reported in band, not as HTTP errors — a run that exceeds its execution timeout returns HTTP 200 with `status: \"failed\"` and `error.code: \"TIMEOUT\"`, so branch on `status`."
@@ -9147,6 +9171,7 @@
9147
9171
"output": {
9148
9172
"result": "Ticket routed to Support"
9149
9173
},
9174
+
"blockOutputs": null,
9150
9175
"error": null,
9151
9176
"startedAt": "2026-08-09T18:04:10.000Z",
9152
9177
"endedAt": "2026-08-09T18:04:11.000Z",
@@ -9305,7 +9330,7 @@
9305
9330
"type": "boolean"
9306
9331
},
9307
9332
"selectedOutputs": {
9308
-
"description": "Block output references to include in a streamed response, as `blockId`, `blockId.path`, or `BlockName.path` (resolved against the live workflow). Requires `stream: true` — it shapes the streamed envelope only, so it is rejected on a sync request and when `async` is true. To narrow a finished run, pass `selectedOutputs` to the run resource instead.",
9333
+
"description": "Block output references to include in the response, as `blockId`, `blockId.path`, or `BlockName.path` (resolved against the workflow state being run). On a sync request the named outputs come back in `blockOutputs`, keyed by these selector strings; on a stream they shape the streamed envelope. Selectors that resolve to no block or no value are omitted. Rejected when `async` is true — a queued run has produced nothing to select; narrow the finished run via the run resource instead.",
Copy file name to clipboardExpand all lines: apps/sim/lib/api/contracts/v2/workflows.ts
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1293,7 +1293,7 @@ export const v2ExecuteWorkflowBodySchema = z
1293
1293
.max(100)
1294
1294
.optional()
1295
1295
.describe(
1296
-
'Block output references to include in a streamed response, as `blockId`, `blockId.path`, or `BlockName.path` (resolved against the live workflow). Requires `stream: true` — it shapes the streamed envelope only, so it is rejected on a sync request and when `async` is true. To narrow a finished run, pass `selectedOutputs` to the run resource instead.'
1296
+
'Block output references to include in the response, as `blockId`, `blockId.path`, or `BlockName.path` (resolved against the workflow state being run). On a sync request the named outputs come back in `blockOutputs`, keyed by these selector strings; on a stream they shape the streamed envelope. Selectors that resolve to no block or no value are omitted. Rejected when `async` is true — a queued run has produced nothing to select; narrow the finished run via the run resource instead.'
1297
1297
),
1298
1298
includeThinking: z
1299
1299
.boolean()
@@ -1365,6 +1365,12 @@ export const v2ExecuteWorkflowDataSchema = z
output: z.unknown().describe('Workflow output, including partial output on failure.'),
1368
+
blockOutputs: z
1369
+
.record(z.string(),z.unknown().describe('Output value produced by one workflow block.'))
1370
+
.nullable()
1371
+
.describe(
1372
+
'Outputs of the blocks named by `selectedOutputs`, keyed by those selector strings, or null when none were requested. Selectors whose block did not run or whose path is absent are omitted; failed runs include the outputs of the blocks that did run.'
1373
+
),
1368
1374
error: v2ExecutionErrorSchema
1369
1375
.nullable()
1370
1376
.describe('Structured execution failure, or null when none occurred.'),
0 commit comments