Summary
npx workflow inspect runs --backend vercel fails to parse the API response body. The response appears to be gzip-compressed (note the \x1f\x8b gzip magic bytes rendered as � and the Content-Type: unknown), but the CLI tries to JSON.parse the raw, undecoded bytes — producing a SyntaxError.
Steps to reproduce
npx workflow inspect runs --backend vercel
Output
┌───────────────────────────────────────────────────────────────┐
│ Workflow CLI v4.2.10 │
│ Docs at https://useworkflow.dev/ │
└───────────────────────────────────────────────────────────────┘
[Info] Vercel project detected. Loading project data...
[Error] Error: Failed to parse response body for GET /v2/runs?limit=20&sortOrder=desc&remoteRefBehavior=lazy (Content-Type: unknown):
SyntaxError: Unexpected token '�', "�ddata��"... is not valid JSON
Analysis
- The leading bytes (
�ddata) are consistent with a gzip-compressed payload (0x1f 0x8b).
Content-Type: unknown suggests the response lacks/loses its content-type header, so the CLI never branches into a decompress-then-parse path and instead feeds the compressed bytes straight to JSON.parse.
- Likely fix: have the HTTP client honor
Content-Encoding: gzip (decompress before parsing), or send Accept-Encoding: identity for these requests.
Environment
- Workflow CLI:
@workflow/cli/4.2.10 (also reproduced under newer workflow packages)
- Node: v26.3.0
- Platform: darwin-arm64
- Backend:
--backend vercel
Summary
npx workflow inspect runs --backend vercelfails to parse the API response body. The response appears to be gzip-compressed (note the\x1f\x8bgzip magic bytes rendered as�and theContent-Type: unknown), but the CLI tries toJSON.parsethe raw, undecoded bytes — producing aSyntaxError.Steps to reproduce
Output
Analysis
�ddata) are consistent with a gzip-compressed payload (0x1f 0x8b).Content-Type: unknownsuggests the response lacks/loses its content-type header, so the CLI never branches into a decompress-then-parse path and instead feeds the compressed bytes straight toJSON.parse.Content-Encoding: gzip(decompress before parsing), or sendAccept-Encoding: identityfor these requests.Environment
@workflow/cli/4.2.10(also reproduced under newerworkflowpackages)--backend vercel