GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — fix(task): subagent explicit edit:allow overrides parent edit:deny by OrShmuel22 · Pull Request #27654 · anomalyco/opencode Conversation
|
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
Other Related PRs:
Recommend checking PR #26845 first as it directly addresses the parent edit deny inheritance issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Quick context on how this differs from the other PRs people might find:
@kitlangton — this builds on your #27201 fix. That PR fixed most of the regression, but orchestrator→editor patterns where the parent has |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR only applies fix for But the fix is rather trivial, just removing the explicit |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Good catch @Sewer56, fixed — any |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@kitlangton Ready for review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@thdxr would be really awesome to get this one sometime soon |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@kitlangton @jlongster @Brendonovich @rekram1-node — this PR has been open for 6 days with no review. It is the final missing piece of the subagent permission inheritance fix chain. The progression:
Without this, orchestrator→editor and commander→worker patterns remain broken for every multi-agent setup. The fix is small (one conditional in subagent-permissions.ts), preserves Plan Mode security, and all 114 tests pass. Community members blocked by this: @nabilfreeman @BurnySc2 @ROKO108 @nmzpy @Sewer56 @tppawelgrzesik Ready to merge — please review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🎻 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Well I guess we can try to get some more attention here, this one is blocking many of us from updating to newer versions of opencode for quite a while now. @adamdotdevin @Hona @Brendonovich pretty please guys, lets fix it 💯 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2b7ea40 to
d25e870
Compare
When a parent agent (e.g. an orchestrator) has edit:deny and spawns a subagent (e.g. an editor) that has edit:allow, the parent's deny was unconditionally inherited into the subagent's session permission. Because permission evaluation is last-match-wins, the inherited deny overrode the subagent's own allow — removing the edit tool from the subagent's palette. Fix: only inherit parent edit:deny rules when the subagent does NOT explicitly declare edit:allow. If a subagent says it can edit, the parent's self-restriction should not override that declared capability. This preserves Plan Mode security: subagents without explicit edit declarations (like general, explore) still inherit the parent's edit:deny as before. Relates to anomalyco#26700 anomalyco#26747 anomalyco#26758 anomalyco#27123
d25e870 to
a439448
Compare
…d parent denies deriveSubagentSessionPermission no longer forwards a parent agent's edit deny (or parent-session denies) for any permission the subagent explicitly allows, so custom subagents like general-opus-4.7 (edit: allow) spawned by edit-denying orchestrators keep edit/write access. Built-in explore/general still inherit the Plan Mode ceiling since they don't declare edit: allow. Adds regression tests and documents the recurring regression + invariant in AGENTS.md. Refs anomalyco#26514 anomalyco#27201 anomalyco#27654.
|
I just run my own OpenCode fork; since it's the easiest way to proceed in a case like this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Well it seems that on this project it's impossible to escalate a PR to get critical fixes merged quick. For example opencode-mem plugin is completely broken for a long time too. Meanwhile releases get pushed sometimes "hourly" because of bugs and bad quality. Imo. what this project really needs is a "new-feature-freeze", a phase that focuses on getting more stability and a less bugged experience. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This behavior is intentional |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Why? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@rekram1-node my use-case:
With current version of opencode Developer cannot use edit/write tool because he inherits Orchestrator deny. Now I could set Orchestrator to edit: allow, however now I risk that if he forgets his primary instruction to not edit/write files on his own, he WILL start doing it by mistake. Also a side note if i recall correctly, other use-cases: Here dev can use write/edit tool. Because the bug seems to only affect forced permission from direct parent only. Because lead dev has in leadDev.md edit permission: allow Another use-case: Here dev cannot use write/edit tool either. I don't understand how this can be intentional. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Heads up — I've forked opencode to a stable branch and I'm maintaining it separately for now. What I fixed (all things upstream doesn't currently have):
Not chasing upstream. No new features. Only important, high-impact fixes — and only once they're stable. If a new upstream feature fits and we need it, I'll add it. @tppawelgrzesik @Sewer56 — fork is here if useful: https://github.com/OrShmuel22/opencode @rekram1-node the delegation pattern (orchestrator
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I can just guess that in the end nobody will care but yeah the way this project currently runs seems sadly fundamentally broken. Nonetheless, thanks everyone, including the community for trying to make things better and all the contributions. @thdxr @adamdotdevin @kitlangton @iamdavidhill @fwang @jayair @Brendonovich @nexxeln @Hona @kommander @jlongster |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Bug: Subagents no longer have access to tools (in commander+worker pattern)
There was an error while loading. Please reload this page.