GeezerVison is showing github.com — feat(automation): give automation tools their own namespace by rekram1-node · Pull Request #65001 · anomalyco/opencode
Conversation
Agents couldn't find the automation tools when they needed a schedule. They lived under tools.opencode, weren't shown in the Code Mode catalog, and their description never said "schedule", "cron" or "repeat", so searching for those words missed them. This moves them into their own automation namespace and leads the descriptions with what they're for.
- tools.opencode.automation_create / automation_list / automation_pause / automation_resume / automation_delete
+ tools.automation.create / list / pause / resume / delete
- The
automation namespace gets its own description, so it shows as a top-level entry in the catalog: "Schedule recurring or one-off jobs (cron jobs, timers, reminders). Each one runs a prompt or Code Mode action at a time, every interval, on a cron or when a connected MCP server pushes an event. Useful for reminders, following up on something later, recurring checks and reports, and reacting to outside events." It uses the words people search for and lists what the tools are for.
create's description now starts with "Schedule a recurring or one-off job: a prompt or Code Mode action that runs once at a time, every interval, on a cron or on a connected MCP server's push event, until it's done or reaches expires", and notes that a code action runs without a model, for cheap checks.
- Direct tool names don't change: the namespace prefix keeps them
automation_create etc., which is what they already were minus opencode_. The unattended-grant denylist in automation/code.ts and the /automation command text follow the new paths.
Trade-off: Code Mode scripts and automation code that call tools.opencode.automation_* stop resolving. Those calls are agent-written and short-lived, so I didn't add aliases. Stored automations can't call create, pause, resume or delete (they're on the unattended denylist), but a stored code automation that calls tools.opencode.automation_list would stop resolving.
Checked: rebased onto dev; test/tool-automation.test.ts, test/automation.test.ts and test/codemode pass (81), bun typecheck in packages/core and bun run check pass. The tools aren't pinned, so the catalog's inline budget is unchanged.
Added by the opencode bot (AI-generated).
Public API: renames the experimental automation tools: Code Mode tools.opencode.automation_* → tools.automation.*, direct/permission names opencode_automation_* → automation_* (not backwards compatible for scripts or permission rules using the old names)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The move works as described. I printed the Code Mode catalog with automations enabled on the base and on this branch: the new automation namespace shows up with its description and all five tools are pinned. The automation and codemode tests pass (84) and tsc is clean.
Public API: experimental and agent-facing only.
- Code Mode paths change from
tools.opencode.automation_{create,list,pause,resume,delete} to tools.automation.{create,list,pause,resume,delete}.
- Direct tool names, which are also the permission keys, change from
opencode_automation_* to automation_*.
- This is not backwards compatible: permission rules that name
opencode_automation_* stop matching. No HTTP, SDK or config schema changes.
Concerns:
- Pinning all five tools costs about 2.2k tokens, which is more than the catalog's whole 2k inline budget. Once automations are on, every other namespace loses its inline listings (inline comment).
- The description says stored automations can't call these tools because they're on the denylist, but
automation.list isn't on it. A stored code automation that calls tools.opencode.automation_list would stop resolving and fail as an unknown tool after this change. That's probably acceptable while automations are experimental, but it's worth a sentence in the description.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
input: Automation.Request,
|
|
|
output: View,
|
|
|
options: { namespace: "opencode", codemode: true },
|
|
|
options: { namespace: "automation", codemode: { pinned: true } },
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinning all five tools costs more than the whole inline catalog budget. Their listings come to about 8,880 characters (create alone is 4,261), roughly 2,220 tokens, against INLINE_BUDGET = 2_000 in codemode/catalog.ts. summarize() subtracts pinned listings before it selects anything else, so once automations are enabled no unpinned tool in any namespace (MCP servers, the rest of opencode, …) gets an inline listing, and every request carries the extra ~2k tokens.
The namespace description already makes the namespace easy to find. Could you pin only create, or none, and leave list/pause/resume/delete to search?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commits only rewrite the description text of the automation namespace and of create; I found nothing new to flag in them. The automation and Code Mode tests still pass (84). They don't change the public API.
The earlier point about pinning still stands: all five tools are pinned, and together they use more than the catalog's 2k-token inline budget (open thread).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
rekram1-node
changed the title
feat(automation): give automation tools their own pinned namespace
feat(automation): give automation tools their own namespace
Nov 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tools are now unpinned, which addresses my earlier point about the catalog's inline budget. The automation and Code Mode tests pass (84) and tsc is clean after the rebase, and nothing still refers to the old opencode.automation_* names. No new concerns.
Public API: the same as in my earlier review. Code Mode tools.opencode.automation_* becomes tools.automation.*, and the direct and permission names opencode_automation_* become automation_*. This is not backwards compatible for scripts or permission rules that use the old names.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit only changes text and looks fine. The automation and Code Mode tests pass (84) and tsc is clean. It doesn't change the public API.
One small gap: the /automation command now names only Code Mode paths, so an agent without Code Mode is told about tools it doesn't have (inline comment).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
Use the tools in the `automation` namespace. They see every automation in this session's project.
|
|
|
|
|
|
- To create one, call `automation_create` with a short `name`, a `trigger` and an `action`.
|
|
|
- To create one, call `tools.automation.create` with a short `name`, a `trigger` and an `action`.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When execute is denied by permissions, Code Mode is off (Tool.codeModeAvailable) and these tools are offered as automation_create, automation_list, … (and opencode_list_mcp_events). Without Code Mode, this text names tools the agent doesn't have. opencode.ts words its system hint differently depending on whether execute is available; could this command mention the direct names as well, e.g. "tools.automation.create (or automation_create)"?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commit only puts back the plain list_mcp_events name in the /automation command text. It's a text change and doesn't touch the public API. Nothing new to flag.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|