Repository navigation
perf(server): idle agent sessions free their memory after 2 minutes - #41174
Merged
Merged
Conversation
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
juliusmarminge
force-pushed
the
perf/idle-sessions-release
branch
from
November 23, 2026 03:28
b4cc4b8 to
fb33254
Compare
An agent session stayed alive for 30 minutes after its turn ended, holding its CLI process. Providers with native resume now release an idle session after 2 minutes and resume the same conversation on the next message. Providers without native resume keep 30 minutes, since a released session would come back as a summary of the thread. On macOS the shared Claude process poll now covers only CLIs that are working: from launch or a queued prompt until the turn's result, which ends with one last read. An idle CLI costs no `ps` runs. Rebuilt from #35711 on top of the shared poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juliusmarminge
force-pushed
the
perf/idle-sessions-release
branch
from
November 23, 2026 03:35
fb33254 to
6a3e355
Compare
Contributor
This was referenced Nov 23, 2026
github-actions Bot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Nov 23, 2026
**v0.1.12-nightly.20261123.5138** · 83 changes from 27 contributors - **Events for outside agents.** ChatGPT and other compatible agents can now receive T3 Code events. - **Faster worktree launches.** New worktree threads start sooner by generating branch names while the worktree is created. - **Less repository slowdown.** T3 Code's Git operations no longer trigger automatic maintenance that can tie up large repositories. - **Queued messages preserved.** Messages remain visible after a server restart cancels a turn that had already started. - **Background work when settling.** Settling a thread no longer stops background agents and commands that its agent is waiting on. ### Plus 69 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * feat(server): outside agents receive milestones by MCP Events webhooks by @juliusmarminge in pingdotgg/t3code#41141 * fix(antigravity): recognize attachments with MIME parameters by @Lucenx9 in pingdotgg/t3code#39097 * fix(antigravity): keep shortened question text valid Unicode by @Lucenx9 in pingdotgg/t3code#39478 * fix(cursor): preserve ended turns when connection retries exhaust by @Yash-Singh1 in pingdotgg/t3code#41176 * fix(server): startup PR backfill looks up each repository branch once by @juliusmarminge in pingdotgg/t3code#41175 * perf(mobile): avoid re-rendering on shell updates in useSidebarRowThreadKey by @Isaac-b-ux in pingdotgg/t3code#41143 * perf(client): skip child indexing when no child needs input by @saphid in pingdotgg/t3code#25537 * fix(server): app links no longer leave the preview stuck loading by @niieani in pingdotgg/t3code#41168 * fix(server): open Claude sessions on macOS share one process-table poll by @juliusmarminge in pingdotgg/t3code#37585 * fix(mobile): screen readers hear when a terminal Ctrl, Alt or Cmd key is latched by @tiliakoos in pingdotgg/t3code#41173 * fix(server): renaming a provider instance no longer stops its sessions by @juliusmarminge in pingdotgg/t3code#41189 * perf(server): idle agent sessions free their memory after 2 minutes by @juliusmarminge in pingdotgg/t3code#41174 * perf(server): checkpoint capture no longer walks every reflog in the repository by @juliusmarminge in pingdotgg/t3code#41177 * test(server): replay scenarios no longer run checkpoints against the real checkout by @juliusmarminge in pingdotgg/t3code#41192 * fix(web): chat file tooltips open beside the link instead of sliding in from the corner by @juliusmarminge in pingdotgg/t3code#41194 * fix(server): RTF attachments leave hidden text out of what agents read by @only21mil in pingdotgg/t3code#41191 * fix(server): Antigravity 502s fail the turn with the real error by @juliusmarminge in pingdotgg/t3code#33596 * fix(web,mobile): translate remaining untranslated workflow, git, and link strings by @SeniorZhai in pingdotgg/t3code#41193 * fix(web): preserve reading position when side panels resize by @juliusmarminge in pingdotgg/t3code#41184 * fix(web): preserve alpha channel when previewing WhiteIsZero TIFF images by @only21mil in pingdotgg/t3code#41196 * fix(server): workflow event types appear only while Workflows is on by @juliusmarminge in pingdotgg/t3code#41202 * fix(server): worktree launches name their branch while the worktree is created by @juliusmarminge in pingdotgg/t3code#36904 * fix(cli): expand ~ paths passed to t3 project add --track by @only21mil in pingdotgg/t3code#41199 * fix(server): html_preview as root names the sandbox opt-out by @juliusmarminge in pingdotgg/t3code#41206 * chore: vouch jschachter by @t3dotgg in pingdotgg/t3code#41215 * fix(server): parse unordered HTML favicon rel tokens by @only21mil in pingdotgg/t3code#41203 * fix(server): token analytics label new models from Codex and Claude catalogs by @t3dotgg in pingdotgg/t3code#41214 * fix(web): file picker highlights stay on the typed letters after İ by @only21mil in pingdotgg/t3code#41216 * fix(server): T3's own git commands no longer start Git's auto maintenance by @mkantenko in pingdotgg/t3code#41200 * fix(web): accept TIFF files containing standard IFD tag type 13 (SubIFDs) by @only21mil in pingdotgg/t3code#41228 * fix(shared): reject keybindings with a dangling or extra '+' by @juliusmarminge in pingdotgg/t3code#41231 * fix(github): a remote host URL rejects no longer breaks GitHub resolution by @juliusmarminge in pingdotgg/t3code#41232 * feat(scripts): a server metrics run catches CPU, memory and first-request regressions by @juliusmarminge in pingdotgg/t3code#41159 * fix(ssh): accept Node versions with build metadata by @Pulsar-Programmer in pingdotgg/t3code#41171 * fix(server): merge-back refuses an archived or deleted parent by @juliusmarminge in pingdotgg/t3code#41229 * fix(contracts): ForwardCompatibleOptional drops the key for values it cannot read by @juliusmarminge in pingdotgg/t3code#41236 * fix(acp): agent terminals keep 1.25 MiB of output, not 16 MiB by @juliusmarminge in pingdotgg/t3code#41243 * feat(cursor): show which step Cursor is in while a turn starts by @Yash-Singh1 in pingdotgg/t3code#41242 * fix(server): Claude turns no longer stay in memory for 10 minutes after each request by @juliusmarminge in pingdotgg/t3code#41238 * fix(server): Claude plan ids live with the turn, not the session by @juliusmarminge in pingdotgg/t3code#41244 * fix(server): pass explicit null payloads to workflows by @only21mil in pingdotgg/t3code#41245 * fix(server): accept unquoted HTML favicon attributes by @only21mil in pingdotgg/t3code#41239 * docs(user): explain how settling differs from archiving a thread by @juliusmarminge in pingdotgg/t3code#41253 * fix(web): spreadsheet text and fills no longer vanish when their cell scrolls out by @Yash-Singh1 in pingdotgg/t3code#41263 * fix(provider): leave MacPorts-owned agent updates to MacPorts by @maria-rcks in pingdotgg/t3code#25208 * fix(acp): sessions no longer keep a record of every turn they ran by @juliusmarminge in pingdotgg/t3code#41256 * fix(web): shift-scroll and horizontal scrollers no longer navigate history by @Yash-Singh1 in pingdotgg/t3code#41264 * fix(web): hidden preview tabs larger than the window capture whole by @jason5545 in pingdotgg/t3code#26965 * fix(web): quick clicks on different sidebar threads open each one by @juliusmarminge in pingdotgg/t3code#41258 * fix(web): match macOS Option shortcuts to the active keyboard layout by @nateEc in pingdotgg/t3code#24034 * fix(server): let the CLI answer workflow questions by their exact name by @only21mil in pingdotgg/t3code#41260 * fix(web): a refused desktop install shows as failed instead of downloaded by @juliusmarminge in pingdotgg/t3code#41262 * refactor(server): adapter snapshots stop carrying provider turns nothing reads by @juliusmarminge in pingdotgg/t3code#41276 * fix(acp): deliver appContext on startTurn and steerTurn by @jieyuexing in pingdotgg/t3code#41241 * fix(server): later Codex retry or failure no longer sorts above same-turn progress by @juliusmarminge in pingdotgg/t3code#41255 * fix(server): branch names keep leading and trailing Unicode whitespace by @juliusmarminge in pingdotgg/t3code#41274 * fix(cli): expand ~ paths in t3 thread --output-schema by @only21mil in pingdotgg/t3code#41271 * fix(web): RTF previews open files that declare code page 0 or 866 by @only21mil in pingdotgg/t3code#41277 * fix(shared): composer file links to names with # ? & ' , % ! ~ open after sending by @shivamhwp in pingdotgg/t3code#41270 * fix(web): No project drafts no longer offer New worktree by @Kwan-Li in pingdotgg/t3code#41269 * fix(server): queued messages stay visible when a restart cancels their started run by @juliusmarminge in pingdotgg/t3code#41307 * fix(desktop): annotation Select picks elements inside open shadow roots by @fixfon in pingdotgg/t3code#23180 * fix(web): archive folders with leading or repeated slashes show their names by @only21mil in pingdotgg/t3code#41301 * fix(server): provider updates keep running when the client disconnects by @juliusmarminge in pingdotgg/t3code#27261 * fix(server): reject workflow signals with conflicting destinations by @only21mil in pingdotgg/t3code#41312 * fix(desktop): declare Apple Events access for Computer Use cleanup by @loia5tqd001 in pingdotgg/t3code#33869 * fix(server): settling no longer ends background work the agent is waiting on by @Kazuya-Hibara in pingdotgg/t3code#31449 * fix(server): CLI single-executable builds again after MCP webhooks by @juliusmarminge in pingdotgg/t3code#41326 * fix(server): preserve spaces in workflow store keys and prefixes by @only21mil in pingdotgg/t3code#41318 * fix(web): remote open uses the environment's saved SSH route by @juliusmarminge in pingdotgg/t3code#27236 * fix(web): an IME Escape no longer clears a typed font family by @heki1224 in pingdotgg/t3code#32768 * fix(web): caret lands after closing Markdown markers after a paste by @juliusmarminge in pingdotgg/t3code#41327 * feat(skills): launch videos can stage file edits, commits and MCP sign-in by @juliusmarminge in pingdotgg/t3code#40202 * perf(server): the full thread snapshot is streamed in bounded chunks by @navidnadali in pingdotgg/t3code#30836 * fix(server): a reconnect burst checks a watched project's branch once, not per subscriber by @juliusmarminge in pingdotgg/t3code#41309 * fix(server): follow replacements along linked theme paths by @StiensWout in pingdotgg/t3code#41325 * fix(shared): search cwd for empty POSIX PATH components by @Motaghi in pingdotgg/t3code#28106 * fix(server): repository lookup shows why a repository was not found by @bmmmm in pingdotgg/t3code#31239 * docs: prune internal and operations docs and enforce them in review by @juliusmarminge in pingdotgg/t3code#41330 * test(server): remove the flaky workflow store case by @juliusmarminge in pingdotgg/t3code#41344 * fix(server): RTF attachments that declare code page 0 or 866 reach the agent as text by @only21mil in pingdotgg/t3code#41340 * fix(desktop): macOS SnapShot skips the window-sharing indicator by @juliusmarminge in pingdotgg/t3code#41334 * fix(desktop): capture the whole oversized preview viewport by @shantanuojha in pingdotgg/t3code#36286 ## New Contributors * @niieani made their first contribution in pingdotgg/t3code#41168 * @SeniorZhai made their first contribution in pingdotgg/t3code#41193 * @loia5tqd001 made their first contribution in pingdotgg/t3code#33869 * @Kazuya-Hibara made their first contribution in pingdotgg/t3code#31449 * @heki1224 made their first contribution in pingdotgg/t3code#32768 * @bmmmm made their first contribution in pingdotgg/t3code#31239 * @shantanuojha made their first contribution in pingdotgg/t3code#36286 **Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261123.5124...v0.1.12-nightly.20261123.5138 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261123.5138
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rebuilds #35711 on top of #37585 (merged).
An agent session stayed alive for 30 minutes after its turn ended. Each idle Claude session keeps its CLI process (about 140 MB, measured in #35711). On macOS each one also kept running the
ps -Adescendant poll while doing nothing.capabilities.turns.supportsNativeResume: Claude, Codex, OpenCode, Cursor). A follow-up resumes the same provider conversation; the cost is starting the provider process again, about a second. A running turn, pending approvals and questions, background work and delegated children still keep a session alive, as before.Known gap, as in #35711: a job whose child leaves the CLI's process tree after the turn ended is found only if it is still in the tree at close.
Tests
ProviderSessionManager.test.ts). The 2-minute case fails on the base branch.psruns between the end of the turn and the exit. Fails on the base branch (one read per second while idle).vp run check:changedpasses.Measured
~/mem-benchharness on cups, the same as in #37585: a fake Anthropic API with the realclaude2.1.330 CLI, and 20 Claude threads that each answered once.XDG_RUNTIME_DIRwas unset so the server takes the no-agent-scope path a Mac takes. The window is 60 s, measured 20 s after the last turn.Twelve of the 20 CLIs had already been released when the window ended (2 minutes after their turns); 8 were still running. The CPU and wakeup drop comes from the idle poll, not the releases: none of the 20 was polled after its turn.
Claude Opus 5.5 via Claude Code (T3 Code), from Theo's #35711.
🤖 Generated with Claude Code