OpenCode v2.2.6 stops project files from running scripts on its server
2 days ago
OpenCode v2.2.6 for developers who code with OpenCode: the server API now serves files as sandboxed downloads and refuses cross-site requests, webfetch rejects URLs with credentials and checks redirects, opencode run waits for its background jobs, starts in a new git worktree with -w and archives CI sessions with --archived, and MCP servers can share one connection with pool: true. https://github.com/anomalyco/opencode/releases/tag/v2.2.6 https://github.com/anomalyco/opencode/blob/v2.2.6/CHANGELOG.md https://github.com/anomalyco/opencode/compare/v2.2.5...v2.2.6
Ask about this presentation
Chapters
0:00Project files can't run scripts on the server
0:14Webfetch checks more before it fetches
0:28opencode run waits for its background jobs
0:41Start a scripted run in a new worktree
0:52Scripted runs stay out of your inbox
1:06MCP servers can share one connection
1:17Three fixes
1:31Run OpenCode in CI? Upgrade, and set a timeout
Show transcriptHide transcript
OpenCode shuts a hole in its server. Files and media from the server API now arrive as sandboxed downloads, and the API refuses cross-site requests, so a file in your project can't run scripts on the server.
Webfetch gets stricter too. It rejects URLs that carry credentials, ignores the fragment when it matches your permission rules, and in Code Mode, every redirect is checked against your webfetch rules.
OpenCode run now waits for the shell commands and subagents its prompt started, then lets the model answer them. There's no time limit, so a dev server keeps the run open. Give CI jobs a timeout.
With the worktree flag, OpenCode run starts its session in a new git worktree, and you can give that worktree a name. It can't be combined with continuing an existing session.
Add the archived flag, and OpenCode run creates the session already archived, so CI runs stay out of your inbox and session lists. Continuing your last session skips them too.
Turn on pooling for an MCP server, and every project with the same setup shares one connection to it. You run fewer processes, and OpenCode starts faster.
Startup no longer hangs when the OpenCode Console never answers. Provider requests keep retrying while their host is unreachable. And Control Z suspends OpenCode even with a dialog open.
If you run OpenCode in CI, I'd upgrade now for the server and webfetch fixes, and give each job a timeout. The rest is in OpenCode's changelog.
Up next
1:50OpenCode now runs on your Claude Code login
@opencode
1 week ago
3:36OpenCode 2.2 lets plugins build into the desktop app and drops its GitHub Action
@opencode
1 week ago
1:43OpenCode ends session sharing and keeps OpenCode 1 updates on 1.x
@opencode
2 weeks ago
3:13OpenCode no longer updates itself, and /update moves you to OpenCode 2
@opencode
4 weeks ago
2:42OpenCode's September: GPT-6 support, and fewer timeouts on slow models
@opencode
1 month ago