# fix\(cli\): report live connections in auth session list · PR \#23277 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23277)

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

Visibility: public

State: open

Source repository: pingdotgg/t3code

Source branch: fix/issue-21236

Target branch: main

Head commit: f0b9b3b8327a9f2142e39bfe556715fa98211df2

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23277)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23277/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23277/diffs?format=markdown)

## Description

---

## Problem

With a live client WebSocket, `t3 auth session list --json` reported `connected: false` while the running server's connections endpoint reported `true`. The CLI read connection state from its own empty in-memory session store.

## Change

Read connected session IDs from the running server's existing auth endpoint using a read-scoped credential that expires after one minute and is revoked before listing. Apply those IDs to the existing local session output. Keep offline listing when the recorded server process has exited, and report an explicit error if a live server cannot answer.

## Scope and approval

Fixes #21236
GitCafe: https://git.cafe/pingdotgg/t3code/issues/21236
Triaged bug via the automated issue flow: [#21236](https://git.cafe/pingdotgg/t3code/issues/21236). Changes cover connection status in the CLI session listing.

## Verification

- The live-server regression test failed on main with `expected false to be true` and passes with the fix.
- `vp test run apps/server/src/cli/pair.test.ts`: 16/16 pass on the reviewed revision, including live connection status, a dead recorded PID, and an unreachable live server's stderr.
- Scoped server typecheck, targeted lint, and formatting pass.

| Evidence | Before | After |
| --- | --- | --- |
| Real server and CLI, Linux / Node v24.21.0 | [Runtime transcript at 8acbefefc5](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/ca60781b251865dd/21236-before-sanitized.log): WebSocket OPEN, HTTP true, CLI false | [Runtime transcript at 10cd74a573](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e87f973f8c7dc028/21236-final-runtime-sanitized.log): HTTP and CLI true while connected, false after disconnect; offline and stale-PID listing succeed; unreachable live origin fails with stderr; temporary credentials revoked and rejected after success and failure |

No UI render paths changed; the visual fixture matrix is empty. The final merge from main leaves both changed files identical to the captured revision. Runtime verification ran on Linux; macOS and Windows were not run. The later merge of current main preserves both reviewed file blobs; its local recheck timed out during host stalls, so CI is pending for that merge.

Implemented by Claude Opus 5.5 through the Claude harness; triaged and verified by GPT-6.1-Sol through the Codex harness in T3 Code.

