Checkpoint of the safe subagent slice:
- SessionExecution.awaitIdle (coordinator drain-to-quiescence loop)
- SessionV2.wait delegates to awaitIdle; drop unavailable error + handler catch
- SessionV2.create: parentID/title, optional location inherited from parent
- subagent tool file (core/src/tool/subagent.ts) NOT yet wired into the node
graph; wiring the global SessionV2 dep from a location-scoped tool is the open
problem being experimented on next.
Brings the latest dev (45 commits) into v2. Conflict resolutions:
- core/src/session.ts: keep v2's Service (BusyError active-checks in
revert.stage/clear/commit, rename method + Renamed event) and add
dev's history method. v2's Renamed event flows through the merged
SessionEvent.Definitions into the OpenCodeEvent union, so it encodes
correctly on the SSE stream.
- server/src/handlers/event.ts: take dev's OpenCodeEvent encoder, which
supersedes v2's PublicEventManifest handler wiring. This also brings
dev's live event stream (allBounded + heartbeat + keepalive headers)
onto v2.
- Removed the now-orphaned public-event-manifest.ts (only self-referenced
after taking dev's handler).
- Generated client + sdk types regenerated via codegen (not hand-merged);
they pick up dev's effect SSE OpenAPI-naming patch (V2EventStream).
- Remove the 24h disk cache (State, readState/writeState, checkInterval)
that served stale latest versions within the TTL window
- Remove file lock (Flock) and confirmation prompt (Prompt/Terminal)
- Every check now hits the npm registry directly
- Updates always auto-install on any version mismatch within the same
major, including rollbacks where the registry version is lower
- Drop the interactive option from check() and the confirm/declined/
dismissed action concepts
Add Effect.logInfo at every previously-silent path in the updater
check so each run is observable in opencode.log: skip reasons
(local install, disabled, policy), the resolved version with source
(cached vs registry), and the final action (up-to-date, dismissed,
declined).
- Replace hardcoded "local" version string with InstallationVersion
- Document DESCRIPTION
Make a request to the running server
USAGE
opencode api [flags] <operation | method path...>
ARGUMENTS
operation | method path... stringOpenAPI operation ID, or an HTTP method followed by a path
FLAGS
--data, -d string Request body
--header, -H string Request header in name:value form
--param key=value OpenAPI path or query parameter
GLOBAL FLAGS
--help, -h Show help information
--version, -v Show version information
--completions <bash|zsh|fish|sh> Print shell completion script (choices: bash, zsh, fish, sh)
--log-level <all|trace|debug|info|warn|warning|error|fatal|none> Sets the minimum log level (choices: all, trace, debug, info, warn, warning, error, fatal, none) server/API debugging command in AGENTS.md
Check the npm registry (at most once per 24h, file-locked) for newer
@opencode-ai/cli releases and act on a host-level autoupdate policy read
from config. Apply patch updates automatically, confirm minor updates
interactively, and never auto-update across majors. Skip local installs
and honor the disable flag. Wired into the default TUI command
(interactive) and serve (background).
Cherry-picks the packages/core changes from the v2 branch onto dev:
- combined ordered stdout/stderr in AppProcess + bash structured output
- edit/apply-patch return FileDiff info with status and line stats
- ignore no-op model switches; record reasoning timestamps
- return unexpected local tool defects to the model and continue
- keep OAuth account metadata out of request bodies
- nest OpenAI reasoning effort/summary options
- load OpenCode provider config asynchronously; batch plugin boot
- export latest public event manifest
Includes the supporting schema reasoning time field and regenerated
client/SDK types.