[PR #1303] [CLOSED] Agent execution trough CLI "run" command #9879

Closed
opened 2026-02-16 18:14:19 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1303
Author: @mpazik
Created: 7/25/2025
Status: Closed

Base: devHead: agent-run-command


📝 Commits (1)

  • 36c722e feat: Add agent execution support to CLI

📊 Changes

3 files changed (+36 additions, -7 deletions)

View changed files

📝 packages/opencode/src/cli/cmd/run.ts (+17 -6)
📝 packages/web/src/content/docs/docs/agents.mdx (+12 -0)
📝 packages/web/src/content/docs/docs/cli.mdx (+7 -1)

📄 Description

Thank you @thdxr for prompt implementation of agents. I love them.

Added support to execute agents via run command. It is something I use quite frequently in my personal fork.
Personally, I find agents more fitting in run the command than modes.

Here is an example of how to use it:
bun dev run --agent example-driven-docs-writer "update /Users/marekpazik/src/opencode/packages/web/src/content/docs/docs/cli.mdx. Agents can now be executed using the run command. See /Users/marekpazik/src/opencode/packages/opencode/src/cli/cmd/run.ts"

Feel free to give suggestions or rewrite the code if needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1303 **Author:** [@mpazik](https://github.com/mpazik) **Created:** 7/25/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `agent-run-command` --- ### 📝 Commits (1) - [`36c722e`](https://github.com/anomalyco/opencode/commit/36c722e1c28d9276f1dd7287e6d17d3eb1bfe089) feat: Add agent execution support to CLI ### 📊 Changes **3 files changed** (+36 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/cli/cmd/run.ts` (+17 -6) 📝 `packages/web/src/content/docs/docs/agents.mdx` (+12 -0) 📝 `packages/web/src/content/docs/docs/cli.mdx` (+7 -1) </details> ### 📄 Description Thank you @thdxr for prompt implementation of agents. I love them. Added support to execute agents via run command. It is something I use quite frequently in my personal fork. Personally, I find agents more fitting in `run` the command than modes. Here is an example of how to use it: `bun dev run --agent example-driven-docs-writer "update /Users/marekpazik/src/opencode/packages/web/src/content/docs/docs/cli.mdx. Agents can now be executed using the run command. See /Users/marekpazik/src/opencode/packages/opencode/src/cli/cmd/run.ts"` Feel free to give suggestions or rewrite the code if needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:19 -05:00
yindo closed this issue 2026-02-16 18:14:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9879