[PR #3288] refactor: whitelist read-only bash tools in Plan agent #10592

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/3288

State: closed
Merged: Yes


My workflow

I use the "Plan" built-in agent to draft an implementation plan before switching to the "Build" agent to actually implement it.

  1. Switch to "Plan" (I actually have it as my default agent)
  2. I explain the problem and context that I know already know
  3. OpenCode explores the codebase and expands the context
  4. OpenCode drafts a plan to implement a solution
  5. We iterate it together as many times as needed
  6. Switch to "Build"
  7. I let it implement it without much supervision

Motivation

Usually, in step 3 it tries to run some tools that are read-only, and yet it asks the user for permission.
Claude Code didn't do this, I want the same behavior in OpenCode :)

Proposed solution

Not all bash tools modify files, so we could whitelist the read-only ones.

Help

Maybe that's not the intended way to use Plan/Build. Please let me know if that is the case!

Issues this would solve

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3288 **State:** closed **Merged:** Yes --- # My workflow I use the "Plan" built-in agent to draft an implementation plan before switching to the "Build" agent to actually implement it. 1. Switch to "Plan" (I actually have it as my default agent) 1. I explain the problem and context that I know already know 1. OpenCode explores the codebase and expands the context 1. OpenCode drafts a plan to implement a solution 1. We iterate it together as many times as needed 1. Switch to "Build" 1. I let it implement it without much supervision # Motivation Usually, in step 3 it tries to run some tools that are read-only, and yet it asks the user for permission. Claude Code didn't do this, I want the same behavior in OpenCode :) # Proposed solution Not all bash tools modify files, so we could whitelist the read-only ones. # Help Maybe that's not the intended way to use Plan/Build. Please let me know if that is the case! # Issues this would solve - https://github.com/sst/opencode/issues/2709 - https://github.com/sst/opencode/issues/3174
yindo added the pull-request label 2026-02-16 18:15:17 -05:00
yindo closed this issue 2026-02-16 18:15:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10592