GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): keep Claude messaging sessions alive by Gigioxx · Pull Request #9612 · pingdotgg/t3code

Conversation

@Gigioxx

@Gigioxx Gigioxx commented Sep 4, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What Changed

Keep live Claude sessions out of the inactivity reaper so their cross-session messaging endpoint remains addressable. Other providers and Claude bindings without a live adapter session keep the existing cleanup behavior.

Why

Claude's process owns its roster entry and messaging socket. Reaping an idle thread removes it from ListAgents, makes SendMessage fail, and resuming cannot restore the same endpoint identity.

Fixes #9586.

Verification

  • Reproduced the failure with a focused reaper test before the fix
  • vp test run apps/server/src/provider/Layers/ProviderSessionReaper.test.ts (9 passed)
  • Targeted format and lint passed
  • vp run --filter t3 typecheck passed
  • git diff --check passed

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Implemented with gpt-5.6-sol in T3 Code through the Codex harness.


Note

Medium Risk
Changes session lifecycle for Claude only and adds a listSessions dependency each sweep; wrong skip logic could leave zombie sessions or fail to reap when messaging is gone.

Overview
The inactivity ProviderSessionReaper no longer stops idle Claude bindings when listSessions() still reports a live claudeAgent session for that thread, so cross-session messaging can keep using the same process endpoint. Other providers and Claude bindings without a live adapter session still follow the existing stale-session cleanup.

Tests mock activeSessions on the harness, assert stale codex sessions are still reaped, and add cases for idle ready / error Claude threads that must not call stopSession. Multi-session failure/defect scenarios use error thread status on the Claude side so those bindings are not exempted by the new skip rule.

Reviewed by Cursor Bugbot for commit c3ab694. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix ProviderSessionReaper to keep live Claude messaging sessions alive

The reaper previously stopped stale persisted Claude bindings even when a live session was still active. The sweep in makeProviderSessionReaper now calls providerService.listSessions, builds a set of active Claude thread IDs, and skips stopping any Claude binding whose thread ID is in that set.

Tests in ProviderSessionReaper.test.ts are updated: the generic stale-session test switched to the Codex provider, and new parameterized tests verify that live idle Claude sessions in ready and error states are retained.

Risk: non-Claude providers are unaffected; only Claude bindings with a matching live thread ID are exempted from reaping.

Macroscope summarized c3ab694.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Gigioxx
fix(server): keep Claude messaging sessions alive
c3ab694
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 4, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Sep 4, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c3ab694

Macroscope's review found this PR approvable — This is a small, focused server bug fix that preserves live Claude processes needed for cross-session messaging while leaving other provider cleanup behavior unchanged. Tests cover both retained Claude sessions and continued cleanup of stale Codex sessions.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ApexYash11 ApexYash11 mentioned this pull request Sep 4, 2026
fix(server): respawn Claude sessions after re-login on expired credentials #9628
Closed
@shivamhwp

shivamhwp commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Note: GPT-6 on behalf of shivam (@shivamhwp).

Please rebase the new reaper cases onto the current sweepAt harness and await its completed sweep. Ten Effect.yieldNow calls do not prove the reaper finished, so the negative stop assertion can pass before the relevant work runs. Preserve the direct thread-shell query and the full idle window after turn settlement when resolving the rebase.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge mentioned this pull request Sep 14, 2026
[Bug]: Session reaper counts host sleep as idle time, so sleeping over 30 min kills every provider session on resume #11805
Open
2 tasks done
@KonstantinKo

KonstantinKo commented Sep 18, 2026

Copy link
Copy Markdown

Just to note, I too am eagerly awaiting this PR getting merged. It also covers Claude sessions that are idle but armed to wake themselves, which the reaper can't see cause neither shows up as a background task. In my case, a scheduled wakeup (ScheduleWakeup, /loop, CronCreate; delays up to 60 min) plus the case of an MCP server channel push (notifications/claude/channel, enabled via --channels in Launch arguments). Both get stopped after 30 idle min...

Repro: T3 Code desktop, Claude provider with --channels in Launch arguments, and an MCP channel server that pushes an event ~40 min after the turn ends. Turn completed at 06:46:02 UTC; the session was stopped at 07:16:34 UTC (30.5 min, plain stopSession, no settle), so the push never arrived and the channel server's in-flight work was torn down with the session.

BTW I'd be happy to help with the test rebase if @Gigioxx has abandoned this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KonstantinKo

KonstantinKo commented Sep 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

@Gigioxx I rebased this onto current main and moved the new cases onto the sweepAt harness: they now await the completed sweep instead of the yieldNow loop, and they fail with the exemption disabled. Your commit is unchanged apart from the rebase (no conflicts; the direct thread-shell query and the full idle window after settlement are intact).

On top of that, two separate commits you can take or drop:

  • the 3-line test change;
  • a fix for a regression the new lookup introduces: listSessions() dies on a binding mismatch, which aborts every sweep and stops reaping for all providers. An unknown live set now keeps Claude sessions and lets the sweep continue, with a regression test.

Compare against main: main...KonstantinKo:t3code:reaper-rebase-9612

Taking it is one command from your checkout:

git fetch https://github.com/KonstantinKo/t3code reaper-rebase-9612 && git push -f origin FETCH_HEAD:t3code/keep-messaging-sessions-alive

vp test run apps/server/src/provider/Layers/ProviderSessionReaper.test.ts passes 14/14; lint, fmt and the server typecheck are clean.

(Written by Claude Opus 5 for Konstantin)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge mentioned this pull request Sep 21, 2026
feat(orchestrator): introduce new orchestrator #2829
Merged
@juliusmarminge ChatGPT Codex Connector

juliusmarminge commented Oct 1, 2026

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

Closing for incomplete verification. The new tests assert that Claude sessions survive after only ten Effect.yieldNow calls, without waiting for a completed sweep, as already noted in the maintainer review. Please move these cases to the sweepAt harness, show that they fail without the exemption and pass with it, and request reconsideration. KonstantinKo's linked branch contains that test update, but it has not reached this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Oct 1, 2026
@Gigioxx

Gigioxx commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

sorry, I left this PR stale, I will open a new one updated with latest main and with verification 🙌🏻

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Gigioxx Gigioxx mentioned this pull request Oct 1, 2026
fix(server): keep Claude messaging sessions alive #14535
Closed
@Gigioxx

Gigioxx commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Replaced by #14535. The new cases run on the sweepAt harness and fail without the exemption (3 tests), and the PR includes before/after manual reproduction evidence. @KonstantinKo, your rebased commits are included with authorship kept. Thanks for picking this up.

KonstantinKo reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alberduris alberduris mentioned this pull request Oct 28, 2026
feat(server): make idle agent release configurable #25624
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Thread shows as live after the idle reaper has stopped its Claude Code process

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@Gigioxx @shivamhwp @KonstantinKo @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.