Repository navigation
Replies: 1 comment
|
I could use something similar. My Pi extension starts a command, lets the agent keep working, then wakes Pi when it exits. T3 has support for that type of wake. The Pi adapter reports pending work only once the wake starts, not while the command runs. The session eligible for idle release. Would you prefer a shared way for Pi extensions to report running jobs or extension-specific support like #17393? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
Let a Pi extension tell T3 "this session owns live background work, keep it loaded". Then long-running supervisor agents can run inside T3 without being idle-released every 30 minutes.
Problem
Follow-up to #18090, which was closed as intended behavior.
A Pi provider session is idle-released after 30 minutes unless
hasPendingBackgroundWorkis true. For Pi that ispendingWake !== null, so it only counts once a wake is already queued. Even then the pin is capped at 4 hours (#17214 documents this).Some Pi extensions are built around a background process that sleeps and only wakes the session when something needs attention. The case that hit this is an orchestrator whose extension arms a watcher. Between wakes, T3 sees no pending work, so after 30 quiet minutes it releases the session. Pi's
session_shutdownstops the extension and the watcher dies, and no wake can ever arrive. In practice the supervisor goes blind every night: one gap ran 7.2 hours, until the user's next message brought the session back.The current workaround is to run the supervisor outside T3. That works, but you lose T3 as the place to talk to it.
Proposed solution
pin("watcher armed")andunpin(), through the extension API or an RPC event. The Pi driver includes any active pin inhasPendingBackgroundWork, the same way a queued wake counts today.maxIdlePinMscap becomes a per-thread (or per provider instance) setting, with "no limit" available for a thread the user explicitly marks as a long-running supervisor. The default stays as it is.Alternatives considered
Impact
Evidence
#18090 has the timeline from
orchestration_events(each release about 30 minutes after the last turn) and the code references that were confirmed in the reply there.All reactions