---
id: 18005
lang: en
title: "OpenCode 2.4.0 Lets an AI Agent Create Its Own Scheduled and Event-Driven Tasks"
published_at: "2026-11-24 04:28:44"
source_name: "X: @opencode"
source_url: "https://x.com/opencode/status/2124886266835505473"
canonical_url: "https://news.hamidun.com/en/news/18005"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# OpenCode 2.4.0 Lets an AI Agent Create Its Own Scheduled and Event-Driven Tasks

> **Краткая суть (BLUF):** OpenCode 2.4.0 can set up background tasks for itself, much like cron: on a schedule or when an event arrives from MCP, the protocol that connects the agent to task trackers and other services. For example, the agent can compile a summary of a repository every morning without being asked. For teams, this moves the tool from an on-demand assistant to a background worker, so it is best to start with read-only tasks.  - Runs on a schedule or on an event from MCP servers - Actions: a prompt, a shell command, or a script in code mode - A script in code mode can access all connected MCP tools

A typical AI coding agent works on demand: you send a request, it replies, and then it goes quiet. Until you return to the chat, it does nothing. In version 2.4.0, the OpenCode developers change this model. The agent now has an automations tool and can create its own tasks that run on a schedule or when an event arrives from MCP. MCP (Model Context Protocol) is the protocol through which an agent connects to external services: task trackers, monitoring, databases. Put simply, it works like cron, except the rule is written not by a person in a config file but by the agent itself, at your request, for example "every morning, compile a summary of the repository."

## What Was Added

According to the authors, the agent can create two types of automations. The first run on a schedule: every hour, once a day, Monday mornings. The second react to MCP events: if a connected server reports something new, the automation fires.

An important detail: the agent creates the automation itself. You do not need to open config files or write a separate scheduler. You describe the task in words, and the agent turns it into a rule that then runs without your involvement.

## What an Automation Can Run

When an automation fires, it can perform one of three actions:

- send a prompt, that is, give the agent a text instruction as if a person had written it;
- run a shell command, for example to launch tests, a build script, or a dependency check;
- run a script in code mode, which has access to your MCP tools.

The third option is the most interesting. Instead of a chain of separate calls to the model, the script can call several MCP tools in one place, process the results with ordinary code, and return the outcome. This is cheaper and more predictable than asking the model to "think through" a routine step each time: code handles the deterministic part, and the model is brought in where reasoning is needed.

## Why It Matters for Practitioners

Typical scenarios are easy to imagine: a morning repository summary, regular checks for outdated dependencies, or a reaction to a new event in a task tracker or monitoring system, if those are connected via MCP. The announcement does not give specific examples, so these are only illustrations of where the mechanism might be applied.

For teams, this is a shift from an assistant you have to call to a background worker. It takes over small repetitive work, but it also raises new questions.

## Limitations and Caution

The announcement is brief, and much is left out. It is not clear how automation permissions are configured, whether there is confirmation before dangerous commands, how run logs are kept, or what happens when something fails. These details are critical: a shell command that the agent runs by itself, on a schedule, without human supervision, is a potential source of problems. The agent may get the wording of a task wrong, and a recurring run will multiply the consequences of that mistake.

A sensible order, therefore, is this: start with read-only automations (reports, checks, summaries), and only later, once you have seen how the system behaves in practice, move to actions that change something. Limit which MCP tools automations can access, and review exactly which commands the agent plans to run on a schedule.

## Conclusion

OpenCode 2.4.0 is another example of coding agents turning from chat interfaces into long-running workflows with schedules and event-driven reactions. If you have already connected MCP servers, the update is worth checking: some manual routine may be handed off to the agent. But until detailed documentation is available, treat this as a new feature with unknown edge cases rather than a ready replacement for CI.

---
- **Первоисточник:** [X: @opencode](https://x.com/opencode/status/2124886266835505473)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18005
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
