OpenCode 2.0
- ID
- 35639
- Status
- summarized
- Published
- 15 Oct 2026, 4:48 AM
- Fetched
- 15 Oct 2026, 8:45 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://anoma.ly/notes/opencode-2-0/
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.0
- Created
- 15 Oct 2026, 8:46 AM
- Tags
- Audience
- developersvibe_codersai_agent_users
What happened
OpenCode 2.0 is a major overhaul that changes the client/server split from an opt-in power-user feature into a single background service that starts automatically, with the TUI, web interface, and desktop app all connecting to the same local process. The API was rewritten from scratch because the old one "grew haphazardly" and "was bad," and a new @opencode/client package ships vanilla-JS and Effect clients that autodiscover the local service for scheduled tasks, plus `opencode api` CLI access and `/pair` (or `opencode pair`) for exposing it to other hosts. The agent is now aware of its own API and calls it directly — worktree_create, session_rename, session_move, session_list, session_context, session_interrupt, session_prompt, tab_close — so a prompt like "stop the stuck flaky-test session, quarantine the test, close my finished tabs" executes as a sequence of API calls. The post claims it draws on "millions of daily users" and notes native apps are in the works, alongside smaller changes like desktop dark mode.
Why it matters
If you have scripts built on @opencode/client or the old OpenCode API, this is a breaking change, not an additive one — the API was replaced wholesale, so test and repin before upgrading. The single auto-starting background service also changes your machine's footprint: one process now backs every client, and `/pair` can expose it to other hosts, so decide deliberately whether that endpoint stays localhost-only on shared or work machines. The self-calling API is the part worth experimenting with: session-level operations (interrupt a runaway session, move work into a git worktree, close tabs) can now be scripted or triggered by the agent itself rather than done by hand.
Discussion angle
The agent calling its own session API to interrupt stuck work and clean up tabs is a real shift in how much of the tool's own state you delegate — where do you draw the line between letting the agent manage its sessions and keeping those controls manual? Also worth checking the HN thread's 99 comments for upgrade breakage reports before you migrate scripts.