Bug Fixes
1. trellis update now actually delivers opencode changes (follow-up to beta.7)
Beta.7 fixed the OpenCode 1.2.x plugin factory-function shape in CLI templates. But users running trellis update on existing projects reported their .opencode/plugins/*.js was still broken — the fix wasn’t reaching them.
Root cause: packages/cli/src/configurators/index.ts had this for opencode:
collectTemplates function returning the platform’s file set for hash-tracked update. OpenCode was the only exception — an old omission, not a design choice. Consequence: collectPlatformTemplates("opencode") returned undefined, so trellis update silently skipped the entire .opencode/ tree. Any CLI-side change to opencode (plugin logic, agent prompts, lib utilities, package.json deps) would ship on init but never propagate on update.
Fixed by adding collectOpenCodeTemplates() that walks the opencode template directory and returns { .opencode/agents/*, .opencode/plugins/*, .opencode/lib/*, .opencode/package.json, .opencode/commands/trellis/*, .opencode/skills/*/SKILL.md }. configureOpenCode (init) was refactored to use the same enumeration, so init and update write byte-identical file sets.
2. Windows hook-path ENOENT after cd in Bash tool
Reported by a user running Claude Code on Windows in a monorepo:
E:\IdeaProjects\ai-codeview\.claude\... (project root), not under frontend/. Claude Code’s Bash tool had changed cwd to frontend/ during an earlier command, and by default that cwd persists into subsequent hook invocations. The UserPromptSubmit hook command — python .claude/hooks/inject-workflow-state.py — resolved the relative path against the stuck cwd and couldn’t find the file.
Fixed by pinning CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1 in .claude/settings.json’s env block:
$CLAUDE_PROJECT_DIR but dropped that approach — CC issue #6023 confirms $VAR syntax doesn’t expand on Windows cmd/PowerShell, which would have made the Windows problem worse.
Upgrade
- opencode: on any beta < 0.5.0-beta.7 with opencode configured, this release auto-updates the 3 plugin files +
trellis-*agents +lib/trellis-context.js+.opencode/package.jsonto current templates. Hash-matched auto-update for unmodified copies; standardModified by youconfirm prompt with diff if customized. - claude settings: if you haven’t modified
.claude/settings.json, it auto-updates. If you customized it (e.g. added your own hooks), you’ll see theModified by youprompt — pick[1] Overwriteto adopt the new env block, or[3] Skipand manually add"env": { "CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "1" }to your settings to get the Windows fix.
npm install -g @mindfoldhq/trellis@beta