📋 Pre-flight Checks
📝 Bug Description
On Windows, when the Pi extension auto-starts engram serve, users can see brief terminal/console flashes during PI startup. The same flash can happen again when a subagent starts, because a child PI process re-runs the extension bootstrap path.
The issue is not the Engram server behavior itself; it is the Windows process launch behavior when the console binary is started on demand from the PI extension.
🔄 Steps to Reproduce
- On Windows, install and use the Engram PI extension with automatic local server startup enabled.
- Make sure no
engram serve process is already running.
- Start PI.
- Observe a brief console/terminal flash while the extension starts Engram.
- Start a PI subagent that triggers the same bootstrap path.
- Observe the flash again.
✅ Expected Behavior
engram serve should still auto-start on demand, but without any visible console flash on Windows, both for the main PI process and for subagent processes.
❌ Actual Behavior
The server starts successfully, but Windows can briefly show a console flash during startup. This degrades startup UX and becomes more noticeable when subagents trigger the same path.
🖥️ Environment
- Operating System: Windows
- Engram Version: 1.17.0
- Agent / Client: Other (PI)
📋 Relevant Logs
Observed process path during reproduction:
- PI extension checks health
- PI extension starts `engram serve` when server is not already running
- On Windows, a visible console flash can occur during this startup
- Subagent startup can retrigger the same bootstrap path in a separate PI process
💡 Additional Context
A local fix that resolved the issue in practice was:
- use a Windows-specific hidden launcher instead of spawning
engram.exe directly from the PI process
- add a cross-process startup lock/mutex so PI and subagents do not race to start the server simultaneously
That preserves current behavior:
- still auto-starts on demand
- no manual server startup required
- avoids visible startup flashes on Windows
- prevents concurrent bootstrap races across PI/subagents
📋 Pre-flight Checks
status:approvedbefore a PR can be opened📝 Bug Description
On Windows, when the Pi extension auto-starts
engram serve, users can see brief terminal/console flashes during PI startup. The same flash can happen again when a subagent starts, because a child PI process re-runs the extension bootstrap path.The issue is not the Engram server behavior itself; it is the Windows process launch behavior when the console binary is started on demand from the PI extension.
🔄 Steps to Reproduce
engram serveprocess is already running.✅ Expected Behavior
engram serveshould still auto-start on demand, but without any visible console flash on Windows, both for the main PI process and for subagent processes.❌ Actual Behavior
The server starts successfully, but Windows can briefly show a console flash during startup. This degrades startup UX and becomes more noticeable when subagents trigger the same path.
🖥️ Environment
📋 Relevant Logs
💡 Additional Context
A local fix that resolved the issue in practice was:
engram.exedirectly from the PI processThat preserves current behavior: