Skip to content

Verify on a Cursor machine: does a Cursor sign-out break other threads' running turns? (upstream give-back) #659

Done

Description

@Jacksondr5

Checks on upstream T3 Code (pingdotgg/t3code) for an agent on a machine with Cursor installed. Work only against upstream T3 Code on an isolated dev server. Don't post anything to pingdotgg/t3code; report back on this issue.

Status (2026-10-26): A and B are done; see the two result comments below. C is the open ask. Do C only; the Safety section and steps 1–4 below still apply for setting up.

C. Does signing Cursor out from Settings break running turns in other threads? (open)

B found that a /logout sent to thread Y killed a running Cursor turn in thread X. X showed only "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs." and a "Cursor is unauthenticated" banner, with nothing about a sign-out. Its shell item stayed running, leaving a stale "Running… / Stop" row. We now plan to report that upstream, instead of the permission issue. Settings' sign-out button and the /logout command call the same code (ProviderAuthService.logout and tryHandlePromptCommand both run auth.logout(stopSessions(...)) in apps/server/src/provider/ProviderAuthService.ts). So the owner signing out from Settings should cause the same damage, but that's only from reading the code. Confirm it.

  1. Set up as in steps 1–3, on current main (record the SHA), with Cursor signed in inside the test server as the owner. Only the owner's session is needed; no narrowed client.
  2. In thread X, start a Cursor turn that runs for at least a minute, for example "Count slowly from 1 to 60, running sleep 1 in the shell between numbers". Use the cheapest model.
  3. While X is running, as the owner, sign Cursor out from Settings → Providers → Cursor, using the normal button.
  4. Record, for thread X:
    • the exact error text and banner shown;
    • whether anything mentions a sign-out;
    • whether the composer is stuck showing "Running… / Stop" instead of Send, and for how long (check again after a minute and after a page reload);
    • the run's and shell item's status in the test database (read-only), as in B.
  5. Sign Cursor back in as the owner. In X, can you send a new message, or press Retry, and does it work? Is the stale row cleared?
  6. Control: a Cursor thread that was idle when you signed out. Does it show anything odd afterwards?
  7. Screenshots of X right after the sign-out, after a reload, and after signing back in. Attach them to your comment here this time.
  8. Clean up as before, and confirm the real Cursor sign-in survived.

Report: SHA, the answers to 4–6, screenshots, anything surprising.

Done

A. Does Cursor ask before T3's own MCP tools run? (done)

T3 attaches its own t3-code MCP server to Cursor sessions (packages/provider-cursor/src/server/adapter.ts, makeCursorAgentOptions, about lines 304–329). There's no per-tool approval rule. Cursor's autoReview is on in Supervised (approval-required) and Auto, and off in Full access. From the code, T3 never shows the person an approval request for these tools. Whether Cursor's own auto-review blocks a call is Cursor's behaviour, and only a live run shows it. On other providers, Codex asks before mutating T3 tools in Supervised, and Claude doesn't.

After step 3 below (Cursor signed in inside the test server, with a working thread), and before the /logout steps:

  • A1. In a Cursor thread set to Supervised, send: "This is a test of MCP tool approvals. Use only the t3-code MCP tools, no shell commands. 1. Call t3_thread_list once. 2. Call t3_thread_update once with action rename and title cursor-supervised-rename (omit threadId so it renames this thread). Don't retry a failed call. Report whether each call succeeded, and quote any error text exactly."

  • A2. For each call, record:

    • whether it ran (did the thread's title change?);
    • whether Cursor's auto-review blocked it, with the exact text;
    • whether an approval prompt appeared in T3's UI.

    Take a screenshot of the thread.

  • A3. Repeat in a new Cursor thread set to Full access, with title cursor-full-rename.

  • Use the cheapest Cursor model available, and nothing else in these turns.

B. The /logout claim to verify (done)

On upstream main (first read at 16918b57d6; still the same code at b808f7fc6d), a message whose whole text is /logout, sent to a Cursor thread, signs the Cursor provider out. It does this even when the sender lacks the Manage providers permission (providers:manage), which the Settings sign-out button requires.

  • Settings sign-out → providerAuthLogout → requires providers:manage (apps/server/src/auth/RpcAuthorization.ts:72).
  • Sending a message only requires orchestration:operate (RpcAuthorization.ts:42). At turn start, ProviderTurnStartService (around line 400) calls ProviderAuthService.tryHandlePromptCommand. Cursor's isLogoutPrompt matches the exact text /logout with no attachments (packages/provider-cursor/src/server/auth.ts, about line 484 now), and T3 runs the same sign-out as Settings: it stops every session on that sign-in and deletes T3's stored Cursor credential.

Safety

  • Never point anything at the machine's real J5 Code or T3 Code install, or its home directory (~/.j5code, ~/.t3).
  • Start the server with the inherited variables unset and a fresh temp home:
    env -u T3CODE_PORT -u T3CODE_HOST -u J5CODE_HOME -u T3CODE_HOME vp run dev --home-dir <tmp>/home
    If vp isn't on PATH, use the clone's node_modules/.bin/vp.
  • Kill only PIDs or process groups you started. Never use pkill, or kill by name.
  • The Cursor sign-in must happen inside the test server, using "Sign in with Cursor" in the test server's Settings → Providers. T3 stores that sign-in in the test home's secrets directory (credentialOwner: "t3"). Before relying on that, confirm the test sign-out doesn't affect the Cursor desktop app's own sign-in or the machine's real install: check the Cursor app is still signed in afterwards. If anything suggests it would sign out the real account, stop and report.
  • Spend as little as possible: send one short prompt, such as "say hi", to prove the Cursor thread works.

Steps

  1. git clone https://github.com/pingdotgg/t3code <tmp>/t3code && cd <tmp>/t3code, and stay on current main. Record its SHA. Then run vp i. Record the OS and the Node version. Upstream needs Node ^24.13.1; use fnm if available, without changing its default.
  2. Start the dev server as above. Open the pairingUrl it prints in the Browser panel. That session is the owner, with every permission.
  3. As the owner, in Settings → Providers, enable Cursor and Sign in with Cursor. Create a project on a scratch folder, open a Cursor thread, and send one short prompt to confirm it works.
  4. Mint a narrowed pairing link without Manage providers, from the clone, against the same temp home. The server CLI calls it --base-dir; it is the same directory the dev runner prints as baseDir=:
    node apps/server/src/bin.ts pair --base-dir <tmp>/home --scope orchestration:read --scope orchestration:operate
    Open it in a separate browser profile, or a private window, so it is a different session: the narrowed session.
  5. Control: in the narrowed session, open Settings → Providers and try Cursor's sign-out. Expect a refusal (missing providers:manage), or no sign-out control at all. Record which.
  6. Test: in the narrowed session, open the Cursor thread and send a message whose whole text is /logout.
    • Expected if the bug is real: Cursor is signed out, the thread shows a provider sign-out item with no agent reply, and the owner's Settings → Providers shows Cursor signed out.
    • Expected if it isn't: the message is refused, or goes to the agent as ordinary text.
  7. Optional, only if cheap: sign Cursor back in as the owner, approve an outside MCP client with "full access", and have it call t3_thread_send with text /logout to the Cursor thread. Skip this if setting up an MCP client is involved, and say so.
  8. Clean up: stop the server by its PID, then delete <tmp>. Confirm the Cursor desktop app, if any, is still signed in.

Report back here

  • A: for Supervised and Full access, what happened to t3_thread_list and to t3_thread_update (ran, blocked by auto-review with the exact text, or prompted), plus the screenshots.

  • OS, Node version, SHA.

  • What step 5 showed: refused, or no control.

  • What step 6 showed: signed out or not, with a screenshot of the thread and one of the owner's Providers page.

  • Step 7's result, or "skipped".

  • Whether the real Cursor sign-in survived.

  • Anything surprising.

Superseded 2026-10-26: the permission issue we decided not to file (kept for reference)

Title: /logout in a message signs a provider out without the "Manage providers" permission

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

Server: provider auth and permissions

Steps to reproduce

  1. Use a Cursor or Antigravity provider instance that is signed in.
  2. Send a message whose whole text is /logout to a thread on that instance, from a client paired without Manage providers (providers:manage). Or have an outside MCP client do it through t3_thread_send.

Expected behavior

The message path applies the same rule as Settings. Signing a provider out through Settings calls providerAuthLogout, which requires providers:manage (apps/server/src/auth/RpcAuthorization.ts:72). A caller without that permission should get the same refusal when it sends /logout.

Actual behavior

The provider is signed out. Sending a message only requires orchestration:operate (RpcAuthorization.ts:42). At turn start, ProviderTurnStartService (around line 400) passes the text to ProviderAuthService.tryHandlePromptCommand. When the adapter's isLogoutPrompt matches (Cursor and Antigravity: exactly /logout, no attachments), T3 runs the same sign-out as Settings. It stops every session using that sign-in, including other threads' running turns. For Cursor it also deletes T3's stored credential. For Antigravity it asks the runtime to sign out. By the time the turn starts, nothing records who sent the message, so no permission can be checked there.

Impact

  • Who can trigger it: a person paired with a narrowed grant that lacks Manage providers. Also an outside MCP client: mcpClientScopes never includes providers:manage, even at full access (apps/server/src/auth/EnvironmentAuth.ts). It can send /logout with t3_thread_send, rewrite a queued message into it with t3_queue_edit, or save it as a scheduled-task prompt.
  • Effect: the provider account is signed out, and every session on it stops. This is recoverable by signing in again, and no data is exposed.
  • Out of scope: thread agents. They carry no session grant, and an agent at full access could run the provider's own logout command anyway. So this report only asks that callers who carry a grant be checked consistently.

Possible fix

People and outside MCP clients each enter through one place that already knows their grant. A small context reference, modeled on DispatchModeLimit, could carry "may sign providers out" from those places to where message text is accepted:

  • Set it in ws.ts from session.scopes, next to RpcAuthorization.layer(session.scopes) (line 3156). For MCP calls with an OAuth client (McpInvocationContext scope.client), set it from mcpClientScopes(scope.client.access). Thread agents and internal paths leave it unset, which means allowed.
  • Check it in the Orchestrator, next to the existing mode-limit check (refuseAboveDispatchModeLimit, around line 3510), for message.dispatch, queued-run.edit and delegated_task.request. Also check it in ScheduledTaskService.upsert for the saved prompt. Each refuses /logout text with no attachments when the reference says no.

No contract or persistence change is needed: replays (queued starts, steer follow-ups, retries, scheduled fires) only reuse text that was checked when it was accepted. Two details:

  • Commands queued during startup (ServerRuntimeStartup.enqueueCommand) run in another fiber, so the reference has to be set inside the queued effect.
  • The check doesn't know the provider, so it would also refuse /logout sent to a Codex or Claude thread, where the text is harmless.

A smaller, WebSocket-only alternative is to add the /logout case to requiredScopesForRpcCall in RpcAuthorization.ts, which already derives providers:manage from settings payloads. That leaves outside MCP clients uncovered.

I found this by reading main at 16918b57d6 and have not run it. I'm happy to send a PR for whichever direction you prefer.

Posted by Claude Opus 5.5, an AI agent, on Jackson's behalf.

Activity

  1. changed the title [-]Verify on a Cursor machine: /logout in a message signs Cursor out without Manage providers (upstream give-back)[/-] [+]Verify on a Cursor machine: T3 MCP tool approvals on Cursor, and /logout without Manage providers (upstream give-back)[/+] on Oct 25, 2026
  2. Jacksondr5 commented on Oct 25, 2026

    @Jacksondr5
    OwnerAuthor

    Results

    Both checks ran on this Mac against upstream T3 Code, on an isolated dev server with a temp home. Two Cursor agents in J5 did the work, coordinated from one thread.

    • OS: macOS 26.7.1 (25G241)
    • Upstream SHA: a0e0f8a80ae4caa6c32d3306a10a284e252c88d3 (pingdotgg/t3code main)
    • Node: v26.12.1 via fnm exec. Upstream main now pins Node 26.12.1 and pnpm 12.14.0, not the ^24.13.1 this issue says. vp wasn't on PATH, so the agents used the clone's node_modules/.bin/vp.
    • Cursor model in the test turns: Gemini 3.6 Flash

    A. Cursor doesn't ask before T3's own MCP tools run

    Thread mode t3_thread_list t3_thread_update (rename) Cursor auto-review Prompt in T3's UI
    Supervised (approval-required) ran ran; title became cursor-supervised-rename no block, no text none
    Full access ran ran; title became cursor-full-rename no block, no text none

    The test database agrees. orchestration_events has no approval or request events for either thread, and both tool items are completed. So on Cursor, Supervised doesn't gate T3's mutating tools at all. Codex asks before mutating T3 tools in Supervised; Cursor behaves like Claude here.

    B. /logout signs Cursor out without Manage providers: confirmed

    • Step 4: minted a link with pair --scope orchestration:read --scope orchestration:operate and opened it in a separate (incognito) browser session.
    • Step 5 (control): no control. The narrowed session's Settings → Providers shows the "Limited permissions" banner ("This session can view 's providers but can't change their settings."). Cursor's panel has no Account section and no sign-in or sign-out button: the web hides ProviderAuthenticationSection when readOnly (apps/web/src/components/settings/ProviderSettingsPanel.tsx, about line 1362). Nothing was refused because there was nothing to click.
    • Step 6 (test): signed out. The narrowed session sent exactly /logout to a working Cursor thread.
      • The thread showed the /logout message, "Worked for 1ms", and no agent reply. The turn holds one command-style /logout item. A banner then read: "Cursor is unauthenticated. Sign in with Cursor or add CURSOR_API_KEY in provider settings."
      • The owner's Settings → Providers → Cursor changed from "Authenticated · Cursor account" to "Not authenticated", with a Sign in button.
      • T3's stored credential (userdata/secrets/provider-auth-….bin) was deleted. The other secrets were untouched.
      • The thread never says the provider was signed out. The only signs are the generic /logout command row and the unauthenticated banner.
    • Step 7: skipped. It needs a fresh Cursor browser sign-in plus an outside MCP client approved through OAuth.
    • Real Cursor sign-in survived. cursor-agent status said "Logged in" both before and after, and the Cursor desktop app still had its auth. T3's Cursor logout is local only: it stops the sessions and clears T3's credential store. It doesn't run cursor-agent logout or revoke anything remotely.
    • Cleanup: the server was stopped by its process group, its ports are free, and the temp dir is deleted.

    The draft's code references at a0e0f8a8

    The claim still holds. Only some line numbers moved; the draft should be updated before filing:

    • apps/server/src/auth/RpcAuthorization.ts:74: providerAuthLogout requires providers:manage (the draft says :72). dispatchCommand requiring orchestration:operate is still at :42.
    • apps/server/src/orchestration-v2/ProviderTurnStartService.ts:431 calls tryHandlePromptCommand (the draft says "around line 400"). The implementation is at apps/server/src/provider/ProviderAuthService.ts:285.
    • packages/provider-cursor/src/server/auth.ts:484: isLogoutPrompt is unchanged. logout is at :395.
    • apps/server/src/auth/EnvironmentAuth.ts:77: mcpClientScopes at full access gives read, operate, settings:write and sourceControl:write, and still not providers:manage.
    • ws.ts:3285: RpcAuthorization.layer(session.scopes, (method, payload) => …) (the draft says :3156, and the call now takes a second argument).
    • Orchestrator.ts:3950: refuseAboveDispatchModeLimit (the draft says around 3510).

    Two more changes to the draft: the step 5 control is a hidden control, not a refusal; and in "Actual behavior", the thread shows only a generic /logout command item.

    Anything surprising

    • Codex and Claude showed as Authenticated in the test server, because they read the machine's real CLI logins rather than a credential held by T3. Anyone repeating this should know those two are live.
    • The browser screenshots are on the test machine and weren't uploaded here. The two from part A are blurred because the browser tab was hidden when they were taken; the thread text and the database check above stand in for them.

    Posted by Claude Opus 5.5, an AI agent, on Jackson's behalf. The tests were run by two Cursor agents (Claude Opus 5.5 through Cursor) in J5 Code.

  3. Jacksondr5 commented on Oct 26, 2026

    @Jacksondr5
    OwnerAuthor

    Follow-up: full testing

    This closes the gaps left by the first run. Antigravity is still untested, because Jackson couldn't do it right now. It ran on this Mac against upstream main at 5b35402623d7d1d88eaa472807272a6c2e78012a (Node 26.12.1), on a fresh isolated test server. Unless noted, the Cursor turns used Gemini 3.6 Flash.

    A. Cursor auto-review never stops T3's MCP tools

    • Auto-review does reach Cursor. The Cursor adapter logs each agent.open options object to userdata/logs/provider/events.<threadId>.log. Supervised and Auto sessions logged "autoReview":true, and Full access logged "autoReview":false. That matches cursorRuntimeAgentPolicy in packages/provider-cursor/src/server/adapter.ts. So auto-review is on, and it lets these calls through.
    • Auto: t3_thread_list and the t3_thread_update rename both ran.
    • Supervised, more destructive calls: archiving a thread (t3_thread_organize action:archive) and a t3_thread_send to another thread both ran.
    • Supervised on Claude Haiku 5.5 through Cursor: both calls ran.
    • No prompts: no call raised a prompt in T3's UI, and orchestration_v2_projection_runtime_requests has 0 rows.
    • The one refusal came from T3, not Cursor. T3 refuses to archive, or t3_thread_send to, a thread whose mode is broader than the caller's: "Child runtime mode full-access is broader than parent mode approval-required."

    B. /logout without Manage providers: every route signs Cursor out

    Control (step 5), now checked on the server. From the narrowed session (orchestration:read, orchestration:operate), a raw WebSocket RPC provider.auth.logout {instanceId:"cursor"} was refused with EnvironmentAuthorizationError: "The authenticated token is missing required scope: providers:manage." Cursor stayed signed in. Small oddity: the error object reports requiredScope: "orchestration:operate" next to requiredPermission: "providers:manage".

    Route, from a caller without providers:manage Result
    Narrowed browser session sends /logout Signed out; T3's credential file was deleted
    Outside MCP client approved at full access (scopes orchestration:read orchestration:operate settings:write source-control:write), t3_thread_send /logout Signed out. The call returned delivery: started with no error.
    Same client, t3_queue_edit changing a queued "say ok" behind a running turn to /logout Signed out when the queued turn started. The original "say ok" is no longer visible anywhere.
    Same client, schedule_task with prompt /logout, then run_scheduled_task_now Saved with no warning; running it signed Cursor out. First, the client had to give the project a default model with t3_project_update, which its scopes allow.

    It stops running sessions in other threads. Thread X had a long Cursor turn running. A /logout sent to thread Y at 23:30:31.891Z made T3 send agent.close and run.cancel to X at .909Z and .910Z, and X's run failed at .910Z.

    What the killed thread shows:

    • X shows only "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs." and a "Cursor is unauthenticated" banner. Nothing mentions a logout or another thread.
    • X's shell item stayed running in the database. The thread kept a "Running: … / Stop" row in place of Send.

    What the threads that ran /logout show: "Worked for 1ms" and no reply. After the queue edit, the thread shows only the final /logout. The scheduled run's thread shows only an "Automation · " chip; the /logout text isn't visible at all.

    It's recoverable. Copying T3's saved credential file back and refreshing provider status restored Cursor with no restart, and a "say hi" turn worked. Signing in again works too.

    Codex and Claude don't treat /logout as a command. Both were sent exactly /logout from the narrowed session, on threads at full access:

    • Claude (Haiku 5.5): replied "/logout isn't available in this environment." It made no tool calls and stayed signed in.
    • Codex (GPT-6-Luna): T3 passed the text to the model, which started acting on it: "I'll check the active T3 session controls and sign out if they're available." It made two read-only tool calls that reached the host machine's real apps, a browser state check and a Computer Use inspection of the real desktop app. Then it stopped to ask which session to log out of. It stayed signed in. This isn't the provider-auth bug: a session with orchestration:operate can already prompt a full-access agent to do anything. But it does mean the draft's "harmless on Codex or Claude" is true only of T3. The agent may still act on the text.

    The real logins survived. The Cursor desktop app, cursor-agent, Codex and Claude were all still signed in at the end.

    For the upstream draft

    • Every claimed route is confirmed: narrowed session, outside MCP client through t3_thread_send, through t3_queue_edit, and through a scheduled-task prompt. So is "stops every session on that sign-in, including other threads' running turns."
    • Under "Actual behavior", add that the interrupted thread gets a generic provider-stream error with no mention of the logout, and keeps a stale running indicator.
    • Under "Impact", note that the queued-edit and scheduled-task routes leave almost no visible trace in the thread.
    • Not tested: Antigravity.

    Screenshots

    Jackson will attach them below. All were taken on the test machine; the test server was stopped and its temp directory deleted.

    Posted by Claude Opus 5.5, an AI agent, on Jackson's behalf. The tests were run by Cursor agents (Claude Opus 5.5 through Cursor) in J5 Code.

  4. changed the title [-]Verify on a Cursor machine: T3 MCP tool approvals on Cursor, and /logout without Manage providers (upstream give-back)[/-] [+]Verify on a Cursor machine: does a Cursor sign-out break other threads' running turns? (upstream give-back)[/+] on Oct 26, 2026
  5. added a commit that references this issue on Oct 26, 2026
  6. Jacksondr5 commented on Oct 26, 2026

    @Jacksondr5
    OwnerAuthor

    Screenshots for A and B

    These are the screenshots from the two result comments above, stored on j5/evidence at issue-659/. The machine's hostname and an account email are blacked out. The first run's two test A screenshots aren't included, because they came out blurred.

    First run (upstream a0e0f8a80a)

    Step 5, the narrowed session's Providers page. Cursor has no sign-in or sign-out control. (Taken after the logout, so Cursor already shows Not authenticated.)
    b-step5-narrowed-providers

    Step 6, the narrowed session sends /logout. No reply, "Worked for 1ms", and the unauthenticated banner.
    b-step6-thread-narrowed

    Step 6, the same turn expanded. It holds one command-style /logout item.
    b-step6-thread-expanded

    Step 6, the owner's Providers page. Cursor is not authenticated.
    b-step6-owner-providers

    Full testing (upstream 5b35402623)

    A, Auto mode. t3_thread_list and the rename both ran.
    full-a-auto

    A, Supervised, more destructive calls. T3 itself refused the archive of a broader-mode thread. Archiving a Supervised thread and t3_thread_send both ran.
    full-a-supervised-destructive

    A, Supervised on Claude Haiku 5.5 through Cursor. Both calls ran.
    full-a-haiku-supervised

    Thread X, after a /logout sent to another thread killed its running turn. Only the generic provider-stream error.
    full-step6-thread-x

    Thread Y, where the narrowed session sent /logout.
    full-step6-thread-y

    The owner's Providers page after that logout.
    full-step6-owner-providers

    Recovery. After restoring the credential, "say hi" works in X.
    full-step7-recovered-say-hi

    Outside MCP client, t3_thread_send /logout. Shown with an "Agent" chip.
    full-step8-mcp-send-thread-y

    Outside MCP client, t3_queue_edit. The queued "say ok" became /logout; only the final text is visible.
    full-step9-queue-edit-thread-x

    Scheduled task with prompt /logout. The run's thread shows only the automation chip.
    full-step10-scheduled-run-thread

    Codex given /logout as text. It asks which session to log out of.
    full-phase3-codex-thread

    Claude given /logout as text.
    full-phase3-claude-thread

    The app rendered in a narrow column, so the right edge of each full-testing screenshot repeats part of the page.

    Posted by Claude Opus 5.5, an AI agent, on Jackson's behalf.

  7. added a commit that references this issue on Oct 30, 2026
  8. Jacksondr5 commented on Oct 30, 2026

    @Jacksondr5
    OwnerAuthor

    C. Settings sign-out breaks running turns in other threads: confirmed

    • Upstream: d487078f11f80543da83e5316a82d43b0a8addbb (pingdotgg/t3code main)
    • Machine: macOS 26.7.1, Node 26.12.1
    • Setup: an isolated test server with Cursor signed in as the owner. Only the owner session was used.
    • Model: Gemini 3.6 Flash, except in step 5 (see there).

    Evidence: issue-659/d487078f11/ on j5/evidence, with the hostname blacked out.

    What happened (step 3)

    Thread X ("Count to 60 with Pauses", full access) had a shell loop running, for i in $(seq 1 60); do echo $i; sleep 1; done. As the owner, I signed Cursor out from Settings → Providers → Cursor.

    • Settings warns first. The button opens a confirmation: "Sign out of Cursor on ? This stops running threads that share this sign-in. Thread history is kept." I confirmed at about 01:04:45Z.
    • T3 stops X. The provider log for X shows agent.close at 01:04:45.903Z and run.cancel at 01:04:45.907Z. X's run became failed at 01:04:45.906Z.

    Step 4: thread X

    • What X shows: a "Provider error" item, "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.", the same text as a banner, and a "Cursor is unauthenticated · Sign in with Cursor or add CURSOR_API_KEY in provider settings." banner.

    • Does anything mention a sign-out? No. Nothing in X says the provider was signed out, or that the turn was stopped on purpose.

    • Stuck "Running… / Stop" row: yes. It shows "Running: for i in $(seq 1 60); do echo $i; sleep 1; done" with Stop, in place of Send.

      When Row still there?
      About 33 s after the sign-out Yes
      After 1 minute Couldn't read: X's browser tab had stopped responding (see Surprises)
      After a page reload (01:07:28Z) Yes, with Send disabled
      In a fresh browser session (01:15Z) Yes
      Three days later, with the thread auto-settled ("Settled 3d ago") Yes
    • Test database (read-only):

      • The run is failed (completed 01:04:45.906Z).
      • The provider turn is interrupted, and the provider session is stopped.
      • The shell command_execution item and its tool-call node are still running, with no completion time. That stuck item is what keeps the row on screen.
    • Unknown: whether the sign-out killed the shell process itself. It was gone when checked, but it would have finished on its own by then.

    Step 5: after signing back in

    • Sign-in: re-signing in from Settings worked.
    • New message: sending "say hi" in X was accepted. The stale row disappeared while the new turn ran.
      • That first turn, on Gemini 3.6 Flash, failed with "[internal] invalid_grant: Invalid JWT Signature."
      • The same error hit the idle control thread and a brand-new Cursor thread on Gemini 3.6 Flash. In the brand-new thread, Composer 2.5 then answered in about 7 s. So this was Cursor's Gemini backend failing that day, not the sign-out.
      • After the failed turn, the stale row came back.
    • New message on Composer 2.5: X replied "Hi — how can I help you today?" and the run completed. The stale row is still there, under that successful reply, and after a reload. The old shell item is still running in the database.
    • Retry: none is offered. X has no Retry button, so the error's "Retry the turn" advice has nothing to act on.

    Step 6: idle control thread

    That thread's Cursor session was closed too (agent.close at 01:04:45.889Z). Its last run stayed completed. It shows only the "Cursor is unauthenticated" banner, has no error or stale row, and its composer stays at Send. Nothing odd.

    Screenshots

    X after a reload, signed out. The provider-stream error and banners, and the stale "Running… / Stop" row.
    c-x-after-reload

    X after signing back in and a successful Composer 2.5 turn. The stale row is still there.
    c-x-after-signin

    The idle control thread after the sign-out. Only the banner.
    c-control-idle-signed-out

    The owner's Providers page after the sign-out.
    c-owner-providers-signed-out

    There's no screenshot of X right after the sign-out. Screenshots of a browser tab that wasn't on screen timed out, and the after-reload one shows the same state.

    Cleanup

    • Test server: stopped by its process group, ports free, temp directory deleted.
    • Real Cursor login: survived; cursor-agent still reports it logged in.

    Surprises

    • X's browser tab froze twice. After the sign-out, X's tab in the in-app browser stopped responding: even new Date() in the page timed out, while the Settings tab and the server kept responding. A fresh tab on X loaded normally. I didn't find the cause, and it may come from the browser panel rather than T3's page.
    • The Gemini failure: "[internal] invalid_grant: Invalid JWT Signature." on Gemini 3.6 Flash while Composer 2.5 worked. This is Cursor-side, but it shows up in T3 as an ordinary "Provider error".

    For the upstream report

    Both routes stop the turn the same way. The Settings path warns the person first, and the /logout path doesn't. Either way, the interrupted thread is left in a bad state:

    • it shows a generic "event stream closed unexpectedly … Retry" error, with nothing saying a sign-out stopped it;
    • its running command item never completes, so a "Running… / Stop" row stays forever, through reloads, new sessions, a re-sign-in and later successful turns;
    • the error says to retry, but X offers no Retry button.

    Posted by Claude Opus 5.5, an AI agent, on Jackson's behalf. A Cursor agent (Claude Opus 5.5 through Cursor) ran most of C in J5 Code; Claude finished the final check and cleanup after that agent stopped.

  9. added 2 commits that reference this issue on Nov 23, 2026
  10. bryantderosier commented on Dec 1, 2026

    @bryantderosier
    Collaborator

    Closing this one, all three checks have answers:

    • A (does Cursor ask before T3's own MCP tools run): answered in the 2026-10-25 and 2026-10-26 comments. Cursor's auto-review never stops T3's tools.
    • B (/logout without Manage providers): confirmed, and upstream has since fixed it. b5bef4d939 "fix(server): /logout in chat needs providers:manage" (fix(server): /logout in chat needs providers:manage pingdotgg/t3code#39027), so we don't need to report this one anymore.
    • C (Settings sign-out breaks running turns in other threads): confirmed on upstream d487078f11 in the 2026-10-30 comment, with screenshots on j5/evidence under issue-659/d487078f11/.

    C is still open upstream: ProviderAuthService.logout still runs auth.logout(stopSessions(...)), which kills other threads' running turns and leaves a stuck "Running… / Stop" row. If we decide to report that upstream, it'll be its own give-back with this issue's evidence linked. The verification this issue asked for is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions