Uh oh!
There was an error while loading. Please reload this page.
feat: allow planning CLI tools (gh, glab) in plan mode - #23985
Conversation
Reframe plan mode restrictions from 'all commands' to 'source code modifications' so planning activities (issue tracking, ticket management, PR/MR creation, documentation) work without forcing users into build mode. - Update plan.txt system prompt with explicit allowed planning activities - Update experimental plan prompt in prompt.ts with same scoping - Add bash permission rules for gh and glab in plan agent config Fixesanomalyco#23984
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#23984
Type of change
What does this PR do?
Plan mode's system prompt blocks all bash commands with absolutist language ("ZERO exceptions", "commands may ONLY read/inspect"). This prevents legitimate planning activities like creating GitHub/GitLab issues via
ghandglabCLI tools, forcing users into build mode prematurely.The bash tool isn't hard-denied in plan mode's permission config — it inherits
"allow"from defaults. The refusal is caused entirely by the system prompt.This PR makes three changes:
plan.txt— Scopes restrictions to "source code modifications" instead of "all commands." Adds an "Allowed planning activities" section listing issue/ticket management, PR/MR creation, documentation artifacts, and project queries.prompt.ts— Same scoping for the experimental plan prompt.agent.ts— Addsbash: { "gh *": "allow", "glab *": "allow" }to the plan agent permission config so the intent is explicit at the permission layer too.Source code edit restrictions remain unchanged (
edit: { "*": "deny" }in permissions + prompt language).How did you verify your code works?
Reviewed the three changed files for correctness. The prompt changes only affect planning-related tool usage — source code protections (hard
edit: { "*": "deny" }permission + prompt restrictions on sed/tee/echo/cat) are preserved. Thegh */glab *bash rules use the existing granular permission pattern matching system documented in the permissions docs.Screenshots / recordings
N/A — prompt and permission config changes, no UI.
Checklist