Open-source AI Tools

OpenCode 2.4.0 Lets Its Coding Agent Set Its Own Alarms

November 25, 20261 views阅读中文原文
OpenCode 2.4.0 Lets Its Coding Agent Set Its Own Alarms

On November 23, the open-source coding agent OpenCode shipped version 2.4.0. The first item in the official changelog is a built-in desktop browser. The one that actually changes how you work is the third: automations, which let the agent schedule itself or wake up when an outside system pushes an event.

There are 334 commits between v2.3.2 and v2.4.0, a count taken from a downstream upgrade diff and cited by AlphaSignal. In plain terms: you no longer have to sit at the terminal to give the order. You can hand one sentence to a clock, or to your CI system.

TL;DR

  • Automations in OpenCode 2.4.0 fire on four triggers: a one-off time, a fixed interval, a cron expression, or an event pushed by an MCP server.
  • Each trigger runs one of three actions: send a prompt, run a Code Mode script, or execute a fixed shell command.
  • Work can land in the current session, in another existing session, or in a freshly spawned subagent.
  • The global off switch is one config line: "automations": false.
  • The same release adds a desktop browser, video generation, and a new TUI look. None of those matter as much as automations.
TriggerJobs it suitsSomeone has to be there?
One-off timeBump dependencies at 2 a.m. and run the testsNo, but read the result yourself
Fixed intervalCheck the build queue every 30 minutesNo
Cron expressionTriage last week's issues every Monday morningNo
Pushed MCP eventCI breaks or a ticket opens, work startsNo, the signal comes from outside

What actually shipped

Automations are not brand new. They rename the earlier experimental schedules feature, and the old flag stays for compatibility. You manage them with the /automation command, and the agent can create, edit, and delete them through the automation_* tools.

Three details deserve their own paragraph.

Shell actions are approved once, at creation. The changelog is explicit: a shell command asks for permission when the automation is created, and every later run records its exit code and output. That is a different experience from a prompt on every execution. The trade is that whatever the command touches, you have to think about at creation time.

MCP Events are in beta. OpenCode follows the MCP push-delivery spec, with argument checks, heartbeats, and automatic reconnects. An event too large for its prompt is skipped, but the automation keeps running instead of dying.

The destination does not have to be you. An automation can target the current session, another session that already exists, or a new subagent. That means a small dedicated agent can sit on one job indefinitely while your main session stays clean.

When was the last time you re-did work because you forgot to run a script?

How to use it

The bar is lower than it sounds, but you do need to be on 2.4.0. The terminal, desktop, and web builds all sit on the same version line.

  1. Upgrade: brew install anomalyco/tap/opencode-v2, or npm install -g @opencode/cli.
  2. Type /automation in the TUI to open the management view. You can also just ask the agent to build one, and it calls the automation_* tools.
  3. Pick the trigger: a one-off time, an interval, a cron expression, or an event bound to an MCP server.
  4. Pick the action: prompt, Code Mode script, or shell command. Shell commands ask for permission here.
  5. Pick the destination: current session, existing session, or a new subagent.
  6. To switch the whole feature off, set "automations": false in your config.

Step four is where people get stuck. A task written as a prompt burns model tokens on every run; a shell command burns none but has no judgment. The guidance in the release notes is to use a Code Mode script as a gate: check state first, then decide whether to wake the model. That reads like a money-saving tip, but it is really a design rule.

Who it's for

  • Teams already wiring OpenCode into CI, issue trackers, or ops tools through MCP. The events exist; what was missing was an executor that can catch them.
  • Repositories with recurring maintenance: a nightly dependency audit, a weekly sweep of stale feature flags, a monthly end-to-end rerun.
  • Solo developers juggling several projects from memory. Trading "I need to remember to do this" for "it does this itself" saves attention, not time.
  • Anyone who wants one small job owned by one dedicated agent over the long run. The new-subagent destination exists for exactly that.

Not a good fit

  • Codebases without real tests. The more often automation runs, the faster bad changes pile up, and you will not be able to tell which run broke it.
  • Teams where nobody can review a shell command. That single approval at creation is the only gate; signing it carelessly is the same as having no gate.
  • Environments that need strict audit trails. Automations record each run's exit code and output, not a full ledger of every action taken.
  • People who just want to type less. This solves unattended execution, not input speed. If you are at the terminal all day, you will not use it.

Pitfalls: four changes that bite

2.4.0 also renamed and reshaped a batch of identifiers and behaviors. Nothing hurts on upgrade day. It hurts the next morning when a script throws.

ChangeOld behaviorNew behavior
Shell timeoutTimeout killed the process; timeout: 0 meant no limitThe command keeps running in the background; timeout: 0 uses the 120-second default
Image toolexperimental_image_generategenerate_image, and saved "always allow" approvals ask once more
Session tool pathstools.opencode.session_renametools.opencode.session.rename, same for _move
Copilot authRead GITHUB_TOKENUse COPILOT_GITHUB_TOKEN, or sign in with OAuth

Two more are easy to miss. Plugins written as name@latest, a version range, a Git branch, or a semver range now check for updates at startup and every 24 hours, and a failed new version falls back to the previous one; pinned versions do not self-update. Separately, stored blobs such as generated videos are deleted server-side after a week, while copies saved into your project directory are untouched.

The timeout change is the nastiest. Scripts that treated a timeout as a failure signal will now see the command still alive in the background, and their retry logic can run the same job twice. Ten minutes of grep over your own scripts before upgrading is cheaper than log archaeology afterward.

Cost and time

ItemPriceNotes
OpenCode itselfFreeOpen source; terminal, desktop, and web
Go subscription$10/month32 open-weight models, allowances scaled per model
Go Plus subscription$40/monthSame models, higher limits, fewer interruptions
Bring your own keyProvider ratesDirect to each provider; OpenCode adds no markup
Upgrade time5 to 15 minutesInstall plus the identifier fixes above

The real bill is not the subscription, it is the tokens an automation burns once it runs. A prompt that wakes the model every 30 minutes fires 48 times a day, and you will see it on the invoice within a week. Gating with a shell command or a Code Mode script and calling the model only when needed is both the cheap path and the stable one.

Next step

Start with the smallest possible thing: pick one command you run by hand every week that is not fatal when it fails, say "run lint and print the output", and turn it into a cron automation that targets a new subagent. Watch it for a week and count how often it fired and how often the result was actually useful.

If that works, wire in CI failure events next. If it does not, your repository is missing tests or logs. Fix those two first and come back to automation later.

Sources

  • OpenCode official changelog, v2.4.0: https://opencode.ai/changelog/v2.4.0
  • OpenCode on X: https://x.com/opencode/status/2124886266835505473
  • GitHub Releases (v2.4.0 / v2.4.1): https://github.com/sst/opencode/releases
  • OpenCode pricing: https://opencode.ai/pricing
  • AlphaSignal report: https://alphasignal.ai/news/opencode-2-4-0-lets-ai-agents-run-themselves-on-schedules-and-events

This article is compiled from multiple media reports and the official changelog. Release date per GitHub Releases: November 23, 2026.

Sources

Comments

0 published
Log inorsign up to leave a comment.

Loading comments...