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
Windows: dreamer verify-diff git calls are not hidden, so one verify pass flashes dozens of console windows #804
On Windows, a dreamer verify pass flashes dozens of console windows that steal focus. This is the same symptom as #553, which was closed as fixed in 0.44.2, but one spawn site was missed.
Every child process in the plugin passes windowsHide: true except the promisified exec in the verify-diff helper:
packages/plugin/src/features/magic-context/dreamer/verify-diff.ts, lines 7 and 18-25
On OpenCode 2 the plugin host is opencode serve --service, which has no console of its own (no conhost child). A console-subsystem child started from it therefore gets a brand new console window, which appears on the desktop and takes focus.
buildVerifyDiffEvidence spawns one git per memory timestamp (rev-list -1 --before), one per distinct base (diff -M --name-status), and two per mapped file (diff -M --no-ext-diff <base> head and <base> worktree). So a single verify pass is tens of git processes.
47 memories and 83 mapped files is roughly 80 git spawns, so roughly 80 console windows within a few seconds. Verify also reruns during the day whenever the gate sees changed files (2026-10-27 had verify passes at 16:54, 17:56, 21:21 and 22:01 UTC), so the flashing repeats.
Why the guard missed it
#553 added a check that fails when a new spawn site omits the hidden-window flag. This site hides behind an alias, const exec = promisify(execFile), so a scan for execFile( / spawn( literals does not see it. On OpenCode 1 the plugin runs inside the user's terminal, so the child inherits the existing console, no window is created, and the bug is invisible in that setup.
Measured
Windows 11 x64, OpenCode 2.2.0, plugin 0.49.25, bun 1.4.4. From a console-less parent, execFile a probe that reports GetConsoleWindow() plus IsWindowVisible():
without windowsHide: {"consoleVisible":true,"hwnd":1904578}
with windowsHide: true: {"consoleVisible":null,"hwnd":0}
The already-running MC embedding worker in the same host is fine, its console is not visible, so the embedding fork path is not involved.
Worth hardening the guard at the same time: either also resolve promisified aliases of execFile/exec, or route every child process through one small helper that sets the flag, so an alias cannot slip past again.
Fixed in v0.49.29, thanks @butterbrodskiy. The dreamer's verify step now runs its git commands with their window hidden on Windows, so a verify pass no longer flashes console windows. A test now checks every place Magic Context starts a process, including ones run through promisified helpers. Update with npx @cortexkit/magic-context@latest setup (or your usual update path) and restart OpenCode or Pi.
Activity
magic-alfonso commentedon Oct 29, 2026
Fixed in v0.49.29, thanks @butterbrodskiy. The dreamer's verify step now runs its git commands with their window hidden on Windows, so a verify pass no longer flashes console windows. A test now checks every place Magic Context starts a process, including ones run through promisified helpers. Update with
npx @cortexkit/magic-context@latest setup(or your usual update path) and restart OpenCode or Pi.