Skip to content

Fix Diagnose with AI killing the agent window after 15 seconds - #233

Merged
huacnlee merged 1 commit into
huacnlee:mainfrom
0xPer0:fix/diagnose-agent-timeout
Sep 17, 2026
Merged

huacnlee merged 1 commit into
huacnlee:mainfrom
0xPer0:fix/diagnose-agent-timeout

Conversation

@0xPer0

@0xPer0 0xPer0 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Diagnose with AI writes a local report and launches the default Omarchy agent through omarchy-agent --prompt. That command execs the terminal and often stays in the foreground for the whole TUI session. diagnostics.py then waited on it with subprocess.run(..., timeout=15), so Python killed the agent window about fifteen seconds after it opened — Hermes included. The session had already started a turn; the kill showed up as a sudden close, not as an Omamail error.

Launch the agent in a new session, wait two seconds only to catch an immediate failure, and leave a still-running window alone.

Verification

tests/test_diagnostics.py is 8 tests, OK in 2.8s. The new test_open_does_not_kill_a_running_agent_window failed against the unfixed subprocess.run(..., timeout=15) (TimeoutExpired after 8s on the test harness) and passed after the change. make test-shell-portable ran the diagnostics suite green; make validate was not completed here because cargo is not installed. Live: Diagnose with AI on Omarchy 4.0.3 with Hermes as the default agent opened a TUI, began a turn, then died at ~15s before this change; after it, the same button starts the agent without that kill. A pass over the diff found no remaining wait that would reap the TUI.

Release Notes

  • Diagnose with AI no longer closes the coding-agent terminal after 15 seconds.

omarchy-agent execs the TUI and can stay in the foreground for the whole session. subprocess.run(..., timeout=15) then SIGKILLs that window. Launch it in a new session and return if it is still running.
@huacnlee
huacnlee enabled auto-merge (squash) September 17, 2026 03:15
@huacnlee
huacnlee merged commit 9534606 into huacnlee:main Sep 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants