Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3b838609a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| public async Task ReconcileAsync(CancellationToken cancellationToken = default) | ||
| { | ||
| ObjectDisposedException.ThrowIf(_disposed != 0, this); |
There was a problem hiding this comment.
Cancel the timer before marking the monitor disposed
If the periodic timer fires after DisposeAsync sets _disposed but before _lifetime.CancelAsync() requests cancellation, this check throws ObjectDisposedException while the exception filter in RunReconciliationAsync still sees an uncancelled token. That permanently faults _reconciliationTask, and the subsequent await in DisposeAsync propagates through MainWindowOnClosing, preventing the usage monitor and shared app-server session from being disposed during shutdown.
Useful? React with 👍 / 👎.
Summary
A missed Stop hook leaves activity dots running after a task finishes, even when other sessions complete normally. The widget now checks tracked turns every 15 seconds through the local Codex app-server and clears activity only when the exact turn has both a terminal status and a completion timestamp.
The check requests metadata with items omitted, follows pagination, and preserves activity on unknown results, unsupported requests, or timeouts. A late response cannot clear a newer turn. Shutdown cancels pending checks before disposing the shared session.
Validation
Limitations
Automatic recovery requires thread/turns/list support and a recorded completion timestamp. A hard termination without recorded completion can still require a later lifecycle event or widget restart. A reconstructed interrupted status without a completion timestamp is deliberately not treated as proof of completion.