Before submitting
Area
apps/server
Steps to reproduce
- Start a thread with a provider that gets the
t3-code MCP server (seen with Claude).
- Have the agent start a turn that asks the user a question (for example with
AskUserQuestion) and leave it unanswered for more than 24 hours. Keep the T3 server running the whole time.
- Answer the question. The same turn continues.
- Have the agent call any
t3-code tool, for example link_pull_request.
Observed timeline: the question was asked at 2026-09-26 10:12 UTC, answered at 2026-09-28 06:19 UTC (44 hours later), and the link_pull_request call at 06:39 UTC failed. The server had been running without a restart since 2026-09-25.
Expected behavior
A provider session keeps a valid t3-code MCP credential for as long as the session is alive, however long a turn runs or waits on the user.
Actual behavior
Every t3-code tool call from that session is rejected:
MCP server "t3-code" rejected the Authorization header in its config (update it, then run /mcp to reconnect)
The session cannot recover. The provider process keeps the old bearer in its MCP config, so reconnecting with /mcp presents the same rejected token.
Cause, in apps/server/src/mcp/McpSessionRegistry.ts:
- Credentials live in memory, and any record whose
lastAliveAt is older than DEFAULT_LIVENESS_WINDOW_MS (24 hours) is pruned.
lastAliveAt is refreshed only by MCP traffic (resolve) and by touchActiveMcpThread, which ProviderService calls from sendTurn and compactThread. Answering a pending user-input request or an approval does not refresh it, and nothing refreshes it while a turn is in progress.
resolve, issue and touch all prune before they refresh, so once 24 hours have passed a later touch cannot bring the record back.
Related, but separate:
Impact
Major degradation or frequent failure
Version or commit
0.0.42; the same code is on main @ d15210c
Environment
Linux, Claude provider
Workaround
Let the turn finish, then restart the T3 server. The next message resumes the session with a fresh credential.
Before submitting
Area
apps/server
Steps to reproduce
t3-codeMCP server (seen with Claude).AskUserQuestion) and leave it unanswered for more than 24 hours. Keep the T3 server running the whole time.t3-codetool, for examplelink_pull_request.Observed timeline: the question was asked at 2026-09-26 10:12 UTC, answered at 2026-09-28 06:19 UTC (44 hours later), and the
link_pull_requestcall at 06:39 UTC failed. The server had been running without a restart since 2026-09-25.Expected behavior
A provider session keeps a valid
t3-codeMCP credential for as long as the session is alive, however long a turn runs or waits on the user.Actual behavior
Every
t3-codetool call from that session is rejected:The session cannot recover. The provider process keeps the old bearer in its MCP config, so reconnecting with
/mcppresents the same rejected token.Cause, in
apps/server/src/mcp/McpSessionRegistry.ts:lastAliveAtis older thanDEFAULT_LIVENESS_WINDOW_MS(24 hours) is pruned.lastAliveAtis refreshed only by MCP traffic (resolve) and bytouchActiveMcpThread, whichProviderServicecalls fromsendTurnandcompactThread. Answering a pending user-input request or an approval does not refresh it, and nothing refreshes it while a turn is in progress.resolve,issueandtouchall prune before they refresh, so once 24 hours have passed a later touch cannot bring the record back.Related, but separate:
Impact
Major degradation or frequent failure
Version or commit
0.0.42; the same code is on
main@ d15210cEnvironment
Linux, Claude provider
Workaround
Let the turn finish, then restart the T3 server. The next message resumes the session with a fresh credential.