Before submitting#
Area#
apps/server
Steps to reproduce#
- Start a Codex or Claude thread and let it call a
t3-code MCP tool, so the provider subprocess holds its bearer token.
- Let the turn finish and leave the thread idle for more than 24 hours. The provider subprocess stays alive.
- Send a new message on the same thread and have the agent call any
t3-code tool.
Expected behavior#
The new turn's touch(threadId) (from RunExecutionService) refreshes the credential the subprocess already holds, and the tool call succeeds.
Actual behavior#
Every t3-code tool call fails with Authentication required / 401 until the provider process restarts. GitHub and other MCP servers still work.
McpSessionRegistry runs pruneDead inside issue, resolve, and touch. After 24 hours without a sign of life, the record is deleted. The next turn's touch finds nothing for the thread, so it cannot restore the token the subprocess is still sending.
This is related to #14076 and the open #18552, but it is a different case. Those cover one turn that waits more than 24 hours, and #18552 keeps the credential alive while the event stream is open. The idle gap here is between turns, when no stream is open, so pruneDead still deletes the record with #18552 applied.
Impact#
Major degradation or frequent failure
Version or commit#
7ac952c630 (main, 2026-10-14)
Environment#
macOS desktop app; Codex and Claude providers
Logs or stack traces#
Observed in Codex threads that resumed after 27, 24.3, and 30.9 hour idle gaps.
Every t3-code tool call returned "Authentication required" until the provider restarted.