Repository navigation
Conversation
Fixes hueyexe#40 against OpenCode 2.0.24: - session.create: only call permission.rules() when the host still has it (2.0.3-2.0.18). Since 2.0.19 the session ruleset merges after the agent's (core permission.ts merge(agent, session) with last-match evaluation), so create() permissions are enough and rules() no longer exists. - worktree create/list/remove/refresh: pass the location's projectID, which the 2.0.19+ worktree API requires; worktree creation silently failed without it and every teammate shared the base tree. - team_spawn: also allow `edit *` for worktree teammates. V2 checks files inside the session location as relative paths, so the absolute `<worktree>/**` rule never matched and edits fell back to an ask nobody could answer. Files outside the worktree stay behind external_directory. - team_spawn: detect read-only agents from the agent's own permission rules (agent.get) instead of only the names plan/explore, so custom reviewer agents are not given a worktree and `shell * allow`. - team_tasks_add: reject unknown depends_on IDs up front instead of creating a task that can never unblock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUtz6gBn7rhXaufK97d8cm
OpenCode 2.0.32 creates worktrees with `git worktree add --detach`, so a teammate's commits landed on a detached HEAD and team_merge failed with "not something we can merge". When the new worktree has no branch, create the requested branch in it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GUtz6gBn7rhXaufK97d8cm
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes the
team_spawncrash + silent worktree failure from #40 on opencode 2.0.19+, plus the stuff that still stops teammates from working after that.vs #41 / #43
both guard
ctx.permission.rules, #41 also validatesdepends_on. this does both, plus:▸ worktree root cause: #41 adds a warning but couldn't find why
worktree.createmade nothing. 2.0.19+ worktree endpoints need aprojectID. ensemble never sent one → creation failed → everyone shared the base tree. now passesctx.location.project.idto create/list/remove/refresh▸ detached worktrees (2.0.32+): opencode now does
git worktree add --detach(packages/core/src/git.ts). teammate commits land on a detached HEAD →team_merge: "not something we can merge". if the new worktree has no branch, ensemble creates it▸ edits stuck on approval: v2 checks in-location files as relative paths, so
edit <worktree>/** allownever matched → ask nobody answers. worktree teammates also getedit * allow. outside-the-worktree stays behindexternal_directory▸ read-only detection: was name-only (
plan,explore). custom reviewers got a worktree +shell * allow. now reads the agent's own rules viaagent.get, names as fallbacknot touched: the 4th #40 thing (notifications redelivered after purge).
on
permission.rules: since 2.0.19 core merges session rules after agent rules (merge(agent, session), last match wins), so thesession.createpermissions already win. skippingrules()when it's gone loses nothing.verification
✓
bun run typecheckclean✓
bun test857 pass / 0 fail (new: projectID pass-through, detached naming, read-only from rules,edit *, unknowndepends_on)✓
bun run lintonly pre-existing warnings✓ live on 2.0.24 + 2.0.32:
✗ not verified: subagent-mode teammates (
exploreetc.) on opencode's freebig-pickle. they get "free tier can only be used from within OpenCode", built-ins too, so it looks like a host/provider thing, not ensemble.🤖 Generated with Claude Code
https://claude.ai/code/session_01GUtz6gBn7rhXaufK97d8cm