Skip to content

chore: bump sandbox opencode to 1.18.19 (message-ID rollover fix) - #14130

Merged
wenxi-onyx merged 1 commit into
mainfrom
whuang/opencode-1.18.19
Aug 20, 2026
Merged

chore: bump sandbox opencode to 1.18.19 (message-ID rollover fix)#14130
wenxi-onyx merged 1 commit into
mainfrom
whuang/opencode-1.18.19

Conversation

@wenxi-onyx

@wenxi-onyx wenxi-onyx commented Aug 20, 2026

Copy link
Copy Markdown
Member

Description

opencode encodes message IDs with a 48-bit timestamp prefix that wrapped on 2026-08-14 11:19:55 UTC. In opencode <= 1.18.14, the prompt loop picks the "latest" message by lexicographic ID comparison, so any session with pre-wrap history silently ignores new prompts: the user message persists, the loop logs step=0 -> exiting loop, and no assistant message is generated. We saw this live on managed_services tenant_dev (session 995a7fb3), whose sandbox pins 1.18.13.

Upstream fixed this in 1.18.15 (anomalyco/opencode#40990: order messages by time.created, gate loop exit on parentID). This bumps the sandbox image pin to 1.18.19, the latest release. Wedged sessions recover on their own once their sandbox re-provisions with the new image; the message data in sqlite is intact.

Also updates the matching snippet in docs/craft/sandbox/image-and-spinup.md.

How Has This Been Tested?

Root cause verified on the live tenant_dev sandbox: stored ID hex prefixes match the wrap math exactly (msg_ff7de04af001 pre-wrap vs msg_0207f26e7001 post-wrap), and v1.18.15+ no longer contains the vulnerable lastUser.id < lastAssistant.id exit check. Sandbox image build with the new pin is exercised by CI.

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.
  • [Optional] Override Linear Check

Summary by cubic

Bumps sandbox opencode to 1.18.19 to fix the message-ID rollover that caused the prompt loop to exit early. Previously (<=1.18.14) sessions with pre-wrap history ignored new prompts and produced no assistant reply; 1.18.15+ orders messages by creation time and gates loop exit on parentID.

  • Change: set OPENCODE_VERSION=1.18.19 in the sandbox Dockerfile and mirror the version in docs.
  • Rollout: re-provision sandboxes to pick up the new image; wedged sessions resume automatically; no data migration required.

Written for commit 8f5a1f8. Summary will update on new commits.

Review in cubic

@wenxi-onyx
wenxi-onyx requested a review from a team as a code owner August 20, 2026 20:45
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates the Craft sandbox image from opencode 1.18.13 to 1.18.19 to incorporate the upstream message-ID rollover fix.

  • Updates the reproducible opencode version pin used to build sandbox images.
  • Keeps the sandbox image documentation snippet synchronized with the Dockerfile.

Confidence Score: 5/5

The PR appears safe to merge, with the runtime version pin and its documentation updated consistently.

The narrowly scoped dependency pin addresses the described upstream rollover defect, and the reviewed changes reveal no concrete build, runtime, security, or documentation failure.

Important Files Changed

Filename Overview
backend/onyx/server/features/build/sandbox/image/Dockerfile Updates the opencode build argument to 1.18.19; no concrete compatibility or build defect was identified.
docs/craft/sandbox/image-and-spinup.md Updates the documented opencode pin to match the sandbox Dockerfile.

Reviews (1): Last reviewed commit: "chore(craft): bump sandbox opencode to 1..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@github-actions

Copy link
Copy Markdown
Contributor

🖼️ Visual Regression Report

Project Changed Added Removed Unchanged Report
admin 2 0 0 185 View Report
exclusive 0 0 0 10 ✅ No changes

@wenxi-onyx wenxi-onyx changed the title Bump sandbox opencode to 1.18.19 (message-ID rollover fix) chore: bump sandbox opencode to 1.18.19 (message-ID rollover fix) Aug 20, 2026
@wenxi-onyx
wenxi-onyx enabled auto-merge August 20, 2026 21:22
@wenxi-onyx
wenxi-onyx added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 439a608 Aug 20, 2026
176 of 180 checks passed
@wenxi-onyx
wenxi-onyx deleted the whuang/opencode-1.18.19 branch August 20, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants