Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 22:43
· 8 commits to main since this release
50ece15

Added

  • Steering at the idle boundary (opencode 2.3+, X22). A message to an agent that is finishing
    its turn is read in that same turn through opencode's experimental.idle hook: no wake-up, no
    extra turn. A message that arrives after that is refused finishing instead of being parked
    unread. Worktree agents, a hook timeout and opencode without the hook keep the 0.2 path.
  • Schema nudge (opencode 2.3+, X23). A schema agent that stops without calling
    workflow_submit is nudged in the same turn. Nudges count against
    MAX_STRUCTURED_OUTPUT_RETRIES, shared with the runner's re-prompts.
    OPENCODE_WORKFLOW_IDLE_HOOK=0 turns the hook off.
  • workflow_script (opencode 2.3+, X24): a freeform tool that takes a new inline script as raw
    text (no JSON escaping) on models whose capabilities list freeform text; it is removed from
    requests for other models. It shares the workflow permission key, so every deny of workflow
    covers it; the workflow tool is unchanged. Turn it off with freeformTool: false or
    OPENCODE_WORKFLOW_FREEFORM=0.
  • TUI agent dialog (X25): <leader>j opens one searchable list of running agents. Enter
    steers, ctrl+u sends an urgent message, ctrl+d stops, ctrl+o opens the child session.
  • TUI sidebar section (X26): a Workflows summary in the session sidebar (foldable when there
    are more than two runs); a child session shows its parent's runs.
  • Desktop app companion (experimental, opencode 2.3 GUI plugin API; X28–X30), shipped as
    ./gui-experimental → dist/gui-experimental.cjs: a composer pill with the session's active
    runs (warning when paused, danger when an agent failed), the live progress tree as a side panel
    (open, pause/resume, stop, message, urgent message; this session or the whole project), and one
    system notification per finished run across windows. The plugin must be listed in
    opencode.json(c); build-only devDependencies vite and vite-plugin-solid were added.

Fixed

  • Background subagents (opencode 2.3, X31). opencode's subagent tool now always runs in the
    background; an agent that launches one returns the answer it gives after the subagent reports,
    not "I launched a subagent". A schema agent no longer spends a retry while its subagent runs,
    and a worktree a running job may still use is kept. The wait ends on stop or the agent timeout
    (30 min cap with a warning). Background shells are not waited for.
  • Steering messages are no longer refused for the rest of an agent's turn when another plugin or a
    user prompt keeps the agent working.
  • A late structured-output nudge no longer uses up an extra retry; parallel or cross-instance
    workflow_submit calls no longer lose an attempt or bring back a finished agent's state.
  • Failed agents report opencode 2.3's actual error instead of "agent session failed (terminal error)".
  • After an urgent message whose follow-up turn produced no text, the result no longer falls back to
    the cut-off text of the interrupted step.
  • The tree's resync driver no longer updates a disposed view when a pending list answers.
  • Cancelling a workflow tool call while its scriptPath approval prompt is open withdraws the
    prompt and starts no run (opencode rejects every prompt open in that session at that moment).
  • A deny rule on any spelling of a scriptPath directory (for example through a symlink) refuses
    it, even when another spelling is allowed (P76).
  • workflow({scriptPath}) inside a running script can no longer wait forever on a prompt that
    another plugin's permission hook re-opened: after 3 s it is refused and the prompt withdrawn.
  • TUI cold start on opencode 2.3 (X27): the tree retries its first list while plugins load and
    starts over on plugin.updated, instead of staying empty until a run starts.

Changed

  • A scriptPath that needs approval now raises opencode's own permission prompt on the workflow
    tool call (ctx.permission.assert) and honours saved "always" approvals, instead of being
    refused. A plain rejection ends the step. workflow({scriptPath}) inside a running script still
    never prompts: only allow rules and saved approvals admit it.

  • TUI internals: global commands are registered at setup, setup is typed, the 500 ms target
    poll is a reactive effect, and the host-agnostic tree logic lives in src/client/ (shared with
    the desktop companion; no process reference, so it runs in a browser).

  • Requires opencode 2.3.0 (was 2.0.15). @opencode/* 2.3.0, effect 4.1.0 (the version
    codemode 2.3.0 needs; older pins crash every run), and the TUI is built with OpenTUI 0.8.4 and
    solid-js 1.9.17 (opencode 2.2+ refuses TUI plugins built for older OpenTUI). Use 0.2.x on 2.0.15.

  • Directory installs ("plugins": ["file:///<repo>"]) now load the built dist/: opencode 2.3
    resolves a directory through its package.json exports. Run npm run build first. The root
    server.ts and tui.tsx shims are gone.

  • Scripts run on codemode's new bytecode VM (much faster CPU-bound code). this, bind/call/apply,
    Object.freeze and WeakMap now work; the authoring guide says so.

Security

  • Determinism guards (P15) could be bypassed on codemode 2.3.0, which added a global require(name)
    and import(name) returning the native globals (const r = require; r("Math").random()). The
    sandbox now hides require and rejects import() in the body syntax check. crypto.randomUUID()
    and crypto.getRandomValues() (another source of nondeterminism, also on 2.0.15) now throw.