Repository navigation
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: 74f572b577
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
| const after = toPublicEntry(entry); | ||
| if (plan.forceEmit === true || !publicEntriesEqual(before, after)) { | ||
| const suppressRetryStatus = event.type === 'retryDue' || (automaticRetry && plan.target === 'retryWaiting'); |
There was a problem hiding this comment.
Preserve a settlement event for pending OAuth updates
When an OAuth tokens-saved or token-invalidation event arrives while an automatic retry is connecting, handleMcpOAuthEvent sees pending and waits for the first non-pending onStatusChange event before calling reconnectAfterCurrent (workspaceMcpService.ts:214-234). If that attempt fails transiently into retryWaiting, this condition suppresses its settlement event, and later automatic retry/failure pairs are suppressed as well; the OAuth handler therefore remains subscribed and does not perform its intended reconnect until a later success or terminal event, potentially after multiple backoff cycles. Retain an internal settlement signal for this waiter or deduplicate only at the user-facing event consumer.
AGENTS.md reference: AGENTS.md:L111-L113
Useful? React with 👍 / 👎.
Requirement or Bug
Transient MCP failures trigger automatic reconnects, but each retry emits another failure status, causing repeated MCP failure rows in the TUI.
Bug Reproduction Steps
MCP server "<name>" failed: ...rows. Restoring the server allows the connection to recover.Root Cause
McpConnectionManager.transitionemitted every publicfailed → pending → failedtransition. The TUI's status deduplication key changes onpending, so each laterfailedpasses deduplication and appends another row. Durable failure episodes were already deduplicated; the problem is limited to observable status events. This is a targeted fix at the event-production boundary, not a change to retry policy.Code Changes
retryDueand a connecting entry with an existing failure streak.pendingstate and its return toretryWaiting.Behavior Changes and Affected Users
pendingand anotherfailed, producing repeated TUI error rowsnextRetryAtAffected module:
agent-core-v2MCP connection management. Verification: 46 focused tests passed locally and on m0-dev; full typecheck and lint passed with 0 errors; m0-dev full suite passed 17,903 tests with 0 failures; native SEA smoke passed; a real MCP session completed connected → error → connected.Checklist
gen-changesetsskill; no changeset was added at the author's request.