You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: The OpenCode status plugin is written in place, so a reload can see it missing or truncated #24121
Operating system: Linux (also applies to macOS, Windows and SSH/WSL hosts) Orca version: checkout at d68a5be13a (1.4.214+)
Orca writes its OpenCode status plugin in place, so the plugin file can be missing or truncated for a moment while it is being replaced. OpenCode 2 reloads a plugin whenever the file's mtime changes (see src/shared/opencode-installed-plugin.ts), so a reload that lands in that window can load nothing or a partial file. I haven't caught that happening; what I confirmed is that the write is not atomic.
Where
OpenCodeHookService.writePluginToConfigDir and writePluginIntoOverlay in src/main/opencode/hook-service.ts: a plain writeFileSync, and the overlay path unlinks first.
installOpenCodePluginInCanonicalConfig in src/relay/opencode-canonical-config.ts and writeOpenCodePlugin in src/relay/plugin-overlay.ts: unlinkSync then writeFileSync, so the file does not exist between the two calls.
The Claude and Codex hook installers already write via a temp file and rename (writeHooksJson and writeManagedScript in src/main/agent-hooks/installer-utils.ts, writeFileAtomically for Codex's real-home hooks JSON). The OpenCode plugin is the outlier, and it is the one where a bad read costs the whole session's status rather than one hook run.
How to reproduce
Mock writeFileSync and record its paths, install over a stale plugin, and assert the plugin's own path was never written. It fails today at all of the sites above.
Fix
Write to a temp file in the same directory and rename it over the target. A dotfile-manager symlink at the canonical path should stay a symlink (write to its target); a mirrored user entry in an overlay should still be replaced, not written through.
Activity
fix(opencode): atomically install status plugin entrypoints
fix(tab-bar): hold the tab strip still while closing tabs with the mo…