# \[Bug\]: T3 MCP tools return Authentication required after switching providers back and forth, preventing PR linking · Issue \#18852 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/issues/18852)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: canceled

Priority: 0

## Description

[Discussion and activity](https://git.cafe/pingdotgg/t3code/issues/18852)

---

### Before submitting

- [x] I searched existing issues and did not find an exact duplicate. Related issue #16565 is discussed below.
- [x] I included enough detail to reproduce or investigate the problem.

### Area

apps/server

### Steps to reproduce

Observed in an existing thread; not yet reproduced in a fresh thread:

1. Start a thread using Claude Sonnet 5.5 and complete several turns.
2. Create pull requests and have the agent register them with `link_pull_request`. This initially succeeds.
3. Switch the same thread to Codex GPT-6.1 Sol, complete turns, then switch back to Sonnet 5.5.
4. Continue switching between these providers after completed turns.
5. On a later Codex turn, create a PR and call `link_pull_request`.
6. Call `list_thread_pull_requests` in the same thread.

Affected thread: `e865d22d-5cba-4270-b721-3f4e5b5b5436`, titled “Playwright PDF Reports: Stage 5”. Incident date: 2026-10-12 UTC.

### Expected behavior

Switching providers between completed turns should preserve access to T3 Code’s MCP tools. The active provider should be able to register new PRs and retrieve the thread’s existing PR links.

### Actual behavior

Earlier Claude turns successfully registered PRs #56, #57 and #58 in `cobblestackhq/cobble-touchstone`.

After repeated Claude/Codex switches:

- Codex’s `link_pull_request` calls for PRs #59 and #60 returned `Authentication required`.
- Codex’s `list_thread_pull_requests` calls returned the same error.
- T3 browser tool calls also reported authentication failures, so this was not limited to PR registration.
- Normal coding turns continued, and PR creation on GitHub succeeded.
- I could no longer see linked PRs in the affected thread.

A subsequent read from another thread confirmed that PRs #56–58 are still stored as links on the affected thread. PRs #59 and #60 are absent from that list. The earlier links were not deleted. Why the existing links were no longer visible in my UI has not been established separately.

### Impact

Major degradation or frequent failure

PR creation on GitHub works, but T3 registration and listing repeatedly fail in the affected session. Browser tools are affected too.

### Version or commit

Currently installed desktop version: `0.0.46-nightly.20261012.3035`.

The version at the exact moment of failure was not separately recorded.

### Environment

macOS, T3 Code Nightly desktop.

Providers/models used in the same thread:
- Claude Agent: `claude-sonnet-5-5`
- Codex: `gpt-6.1-sol`

### Logs or stack traces

These outputs were recovered directly from the affected thread’s recorded tool calls. Times below are UTC, from the items’ `updatedAt` values.

```text
Run 6 — Claude Sonnet 5.5
link_pull_request(.../pull/56) -> alreadyLinked: false
link_pull_request(.../pull/57) -> alreadyLinked: false
link_pull_request(.../pull/58) -> alreadyLinked: false

2026-10-12T22:55:05.490Z — Run 15, Codex GPT-6.1 Sol
t3-code.link_pull_request({
  "url": "https://github.com/cobblestackhq/cobble-touchstone/pull/59"
})
-> [{"type":"text","text":"Authentication required"}]

2026-10-12T22:56:19.589Z — Run 15
t3-code.list_thread_pull_requests({})
-> [{"type":"text","text":"Authentication required"}]

2026-10-12T23:05:55.319Z — Run 17, Codex GPT-6.1 Sol
t3-code.link_pull_request({
  "url": "https://github.com/cobblestackhq/cobble-touchstone/pull/60"
})
-> [{"type":"text","text":"Authentication required"}]

2026-10-12T23:08:05.670Z — Run 17
t3-code.list_thread_pull_requests({})
-> [{"type":"text","text":"Authentication required"}]
```

### Screenshots, recordings, or supporting files

Recorded provider sequence (run start times, UTC, 2026-10-12):

```text
Run 10  22:42:01  claudeAgent  claude-sonnet-5-5
Run 11  22:45:33  codex        gpt-6.1-sol
Run 12  22:46:58  codex        gpt-6.1-sol
Run 13  22:47:24  codex        gpt-6.1-sol
Run 14  22:48:47  claudeAgent  claude-sonnet-5-5
Run 15  22:50:02  codex        gpt-6.1-sol  [PR link/list failures]
Run 16  23:00:22  claudeAgent  claude-sonnet-5-5
Run 17  23:02:29  codex        gpt-6.1-sol  [PR link/list failures]
```

Read-only verification from another thread on 2026-10-13:

```text
list_thread_pull_requests({
  "threadId": "e865d22d-5cba-4270-b721-3f4e5b5b5436"
})
-> succeeds; lists cobblestackhq/cobble-touchstone #56, #57, #58
-> all three have source: agent, state: merged
-> #59 and #60 are not listed
```

No screenshot or recording was collected. The relevant evidence is included inline; the full thread contains unrelated project work and credentials and is not attached. No server-side credential trace has been collected. Credential revocation or reuse remains a hypothesis.

### Related issues

#16565 describes a reused provider session retaining an MCP credential scoped to the other provider after switching back. Its demonstrated error is `parent_not_active`; this incident returns `Authentication required`, including for PR listing.

This may be another manifestation of the same credential lifecycle problem, but the thread history alone does not prove that. If maintainers consider it the same underlying defect, this report can be consolidated into #16565.

### Workaround

No recovery workaround has been tested on the affected provider session. Reading its links from another thread succeeds, but does not restore the failed registrations or the affected thread’s UI.

---
Report prepared with assistance from Codex using the affected thread’s recorded tool outputs.

