Repository navigation
Fix Diagnose with AI killing the agent window after 15 seconds - #233
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pythen waited on it withsubprocess.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.pyis 8 tests, OK in 2.8s. The newtest_open_does_not_kill_a_running_agent_windowfailed against the unfixedsubprocess.run(..., timeout=15)(TimeoutExpiredafter 8s on the test harness) and passed after the change.make test-shell-portableran the diagnostics suite green;make validatewas not completed here becausecargois 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