Skip to content

gortex daemon start --detach make terminals flicker in Windows #217

Description

@druellan

Describe the bug
When I run gortex daemon start --detach in Windows (Windows Terminal, Powershell 7.x) the daemon starts correctly, but each time Gortex operates, or from time to time, all the open terminals flicker and switch focus:

Image

On the capture a new terminal can be seen popping up and off existance.

To Reproduce
Steps to reproduce the behavior:

  1. Run gortex daemon start --detach on Windows Terminal
  2. Right after the start of after a while the terminal flickers

Expected behavior
The daemon executes transparently without affecting any terminal.

Environment:

  • Windows 10 + Windows Terminal
  • PowerShell 7.6.3
  • gortex v0.58.2+89f88ea

Additional context
I did a quick analysis using AI and this is the result:

When the daemon runs in detached mode with --detach, this message is still being written to stderr (which is redirected to the log file on disk). But here's the kicker: every time the daemon does background work—especially during that initial warmup phase where it's re-indexing repos, watching files, and running enrichment—stdout/stderr are still connected to your terminal. The daemon's background goroutines (lines 528-596) emit log messages via the logger. If those logs ever write to stdout/stderr instead of exclusively to the log file, they'll trigger terminal focus/refresh events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions