openclaw - 💡(How to fix) Fix [Bug]: Isolated agentTurn cron jobs fail with gzip JSON parse error (SyntaxError: Unexpected token \u001f) on github-copilot provider since v2026.5.11 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#84145Fetched 2026-05-20 03:43:29
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
labeled ×2closed ×1commented ×1

Isolated agentTurn cron jobs systematically fail with a gzip JSON parse error when using the github-copilot provider. The error has been occurring consistently since approximately 2026-05-11 (KST), affecting all isolated session cron jobs. systemEvent + main session jobs are unaffected.

This appears to be the same compressed-response parsing class as #81865 and #79752, but specifically on the github-copilot provider's isolated cron run path.

Error Message

SyntaxError: Unexpected token '\u001f', "\u001f\ufffd\b\u0000\u0000\u0000\u0000\u0000\u0000\u0003"... is not valid JSON

Root Cause

Suspected root cause

Fix Action

Workaround

Converting isolated agentTurn jobs to systemEvent + sessionTarget: main avoids the isolated runner's HTTP path entirely and resolves the issue.

Code Example

SyntaxError: Unexpected token '\u001f', "\u001f\ufffd\b\u0000\u0000\u0000\u0000\u0000\u0000\u0003"... is not valid JSON

---

2026-05-08: status=ok, model=gemini-3-flash-preview, fallbackUsed=true, durationMs=35936
2026-05-09: status=ok, model=gemini-3-flash-preview, fallbackUsed=true, durationMs=29573
2026-05-11: status=error, FallbackSummaryError: All models failed (2): github-copilot/gemini-3-flash-preview: ... (auth) | github-copilot/claude-sonnet-4.6: ... (auth)
2026-05-12: status=error, SyntaxError: Unexpected token '\u001f' ...
2026-05-13: status=error (same)
2026-05-19: status=error (same)
RAW_BUFFERClick to expand / collapse

Summary

Isolated agentTurn cron jobs systematically fail with a gzip JSON parse error when using the github-copilot provider. The error has been occurring consistently since approximately 2026-05-11 (KST), affecting all isolated session cron jobs. systemEvent + main session jobs are unaffected.

This appears to be the same compressed-response parsing class as #81865 and #79752, but specifically on the github-copilot provider's isolated cron run path.

Environment

  • OpenClaw: latest available (no newer version exists as of 2026-05-19)
  • macOS host (Apple Silicon, Darwin 25.5.0 arm64)
  • Node: v26.0.0
  • Provider: github-copilot
  • Models affected: github-copilot/claude-sonnet-4.6, github-copilot/gemini-3-flash-preview (both fail)
  • Session target: isolated (agentTurn)

Symptoms

All isolated agentTurn cron jobs fail immediately (within ~1 second) with:

SyntaxError: Unexpected token '\u001f', "\u001f\ufffd\b\u0000\u0000\u0000\u0000\u0000\u0000\u0003"... is not valid JSON

The \u001f\u008b prefix is the gzip magic byte sequence. The isolated agent runtime is receiving a gzip-compressed HTTP response from the github-copilot provider and attempting to parse it directly as JSON without decompressing first.

Timeline

  • Before 2026-05-11: Jobs ran successfully using fallbackUsed: true (primary model claude-sonnet-4.6 failing quietly, fallback to gemini succeeding)
  • 2026-05-11 onwards: Even the fallback model (gemini-3-flash-preview) fails — FallbackSummaryError: All models failed (2)
  • Workaround applied: Converted all isolated agentTurn jobs to systemEvent + main session type

Affected jobs (all isolated agentTurn)

  • US market closing report (Tue-Sat 06:00 KST) — 5 consecutive errors
  • Daily weather briefing (Tue-Fri 06:20 KST) — 4 consecutive errors
  • Kioxia news automation (weekdays 07:30 KST) — 3 consecutive errors
  • Daily team retrospective log (23:50 KST) — 2 consecutive errors
  • Daily workspace Git backup (00:00 KST) — 1 error

Not affected

  • systemEvent + sessionTarget: main jobs — all working normally
  • agentTurn + sessionTarget: isolated job using github-copilot/gemini-3-flash-preview that ran on 2026-05-05 (Mon weather, ran once successfully, not triggered since)

Expected behavior

Isolated agentTurn cron jobs should decompress gzip-encoded HTTP responses before JSON parsing, consistent with how main session requests are handled.

Actual behavior

The isolated session runner receives a gzip-compressed response body and passes it directly to JSON.parse(), causing an immediate SyntaxError with binary gzip magic bytes visible in the error message.

Evidence

Run history from a single job showing the transition from success to failure:

2026-05-08: status=ok, model=gemini-3-flash-preview, fallbackUsed=true, durationMs=35936
2026-05-09: status=ok, model=gemini-3-flash-preview, fallbackUsed=true, durationMs=29573
2026-05-11: status=error, FallbackSummaryError: All models failed (2): github-copilot/gemini-3-flash-preview: ... (auth) | github-copilot/claude-sonnet-4.6: ... (auth)
2026-05-12: status=error, SyntaxError: Unexpected token '\u001f' ...
2026-05-13: status=error (same)
2026-05-19: status=error (same)

Note: fallbackUsed: true in pre-failure runs suggests claude-sonnet-4.6 was already silently failing on the github-copilot provider path before the full breakage.

Suspected root cause

The github-copilot provider API endpoint began returning gzip-compressed responses around 2026-05-11. The isolated agentTurn session runner does not handle Content-Encoding: gzip decompression, unlike the main session path. This is likely the same underlying class as #79752 / #81865.

Workaround

Converting isolated agentTurn jobs to systemEvent + sessionTarget: main avoids the isolated runner's HTTP path entirely and resolves the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Isolated agentTurn cron jobs should decompress gzip-encoded HTTP responses before JSON parsing, consistent with how main session requests are handled.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Isolated agentTurn cron jobs fail with gzip JSON parse error (SyntaxError: Unexpected token \u001f) on github-copilot provider since v2026.5.11 [1 comments, 2 participants]