From 8d601720ed6f508c752f1d109f549cd92253e080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2026 14:09:39 +0000 Subject: [PATCH 1/3] Update: Bump the test-tooling group with 1 update Bumps Microsoft.NET.Test.Sdk from 18.9.0 to 18.10.1 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-tooling - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-tooling ... Signed-off-by: dependabot[bot] --- tests/RateTray.E2E/RateTray.E2E.csproj | 2 +- tests/RateTray.Tests/RateTray.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/RateTray.E2E/RateTray.E2E.csproj b/tests/RateTray.E2E/RateTray.E2E.csproj index 4edeb4f..dd40849 100644 --- a/tests/RateTray.E2E/RateTray.E2E.csproj +++ b/tests/RateTray.E2E/RateTray.E2E.csproj @@ -13,7 +13,7 @@ - + diff --git a/tests/RateTray.Tests/RateTray.Tests.csproj b/tests/RateTray.Tests/RateTray.Tests.csproj index 7221d55..12c9212 100644 --- a/tests/RateTray.Tests/RateTray.Tests.csproj +++ b/tests/RateTray.Tests/RateTray.Tests.csproj @@ -11,7 +11,7 @@ - + From 1b69b4783916c5f4f67841c3a228fad204c4336d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 14:11:01 +0000 Subject: [PATCH 2/3] Update: Bump the test-tooling group with 1 update Bumps coverlet.collector from 10.0.1 to 10.1.0 --- updated-dependencies: - dependency-name: coverlet.collector dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: test-tooling ... Signed-off-by: dependabot[bot] --- tests/RateTray.Tests/RateTray.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/RateTray.Tests/RateTray.Tests.csproj b/tests/RateTray.Tests/RateTray.Tests.csproj index 12c9212..85511a6 100644 --- a/tests/RateTray.Tests/RateTray.Tests.csproj +++ b/tests/RateTray.Tests/RateTray.Tests.csproj @@ -10,7 +10,7 @@ - + From 186528c061ed7fa8ac5a33c30c6eac9fd113d098 Mon Sep 17 00:00:00 2001 From: nowrap Date: Mon, 5 Oct 2026 11:09:19 +0200 Subject: [PATCH 3/3] codex: let the app server exit instead of killing its tree mid-startup Codex runs `git ls-remote` for its plugin marketplace while the app server starts. Killing the tree as soon as the limits arrived hit that git during DLL initialisation, and Windows showed a 0xc0000142 popup. Close stdin, wait up to ten seconds, and kill only a server that lingers. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 8 ++++++++ src/RateTray/Providers/CodexUsageProvider.cs | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c78c675..a8ef337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed + +- Windows no longer pops up "git-remote-https.exe – 0xc0000142" every few refreshes. Codex + starts a `git ls-remote` for its plugin marketplace when the app server comes up, and the tray + killed the whole process tree the moment the limits arrived — often while that git was still + initialising. The tray now closes the server's stdin and waits up to ten seconds for it to + exit on its own; it only kills a server that lingers. + ## [0.3.2] - 2026-08-19 A patch release for two things one screenshot showed at once: a rate limit the tray had been diff --git a/src/RateTray/Providers/CodexUsageProvider.cs b/src/RateTray/Providers/CodexUsageProvider.cs index fe1c0e0..ed1f20c 100644 --- a/src/RateTray/Providers/CodexUsageProvider.cs +++ b/src/RateTray/Providers/CodexUsageProvider.cs @@ -134,7 +134,7 @@ await process.StandardInput.WriteLineAsync( } finally { - TryKill(process); + await StopAsync(process).ConfigureAwait(false); } var diagnostics = await SafeAwait(stderr).ConfigureAwait(false); @@ -308,6 +308,22 @@ private static void AddWindows(List readings, JsonObject bucket, s return candidates.FirstOrDefault(File.Exists); } + /// + /// Closes stdin so the server exits on its own, and kills only if it lingers. An + /// immediate tree kill hits the git ls-remote codex spawns at startup for its + /// plugin marketplace mid-initialisation, and Windows answers with a 0xc0000142 popup. + /// + private static async Task StopAsync(Process process) + { + try { process.StandardInput.Close(); } + catch (Exception ex) when (ex is IOException or ObjectDisposedException) { } + + try { await process.WaitForExitAsync().WaitAsync(TimeSpan.FromSeconds(10)).ConfigureAwait(false); } + catch (TimeoutException) { } + + TryKill(process); + } + private static void TryKill(Process process) { try