feat: idle timeout detection before Kernel session expires#155
Draft
feat: idle timeout detection before Kernel session expires#155
Conversation
cbaa6fd to
9785798
Compare
- Add BrowserSession table to persist session mappings across Cloud Run restarts - Disconnect CDP on component unmount (stops Kernel billing while user is away) - Reconnect from DB when user returns to chat (reuses same Kernel browser) - Fall back to DB lookup in getBrowser/getOrCreateBrowser for crash recovery - Clean up BrowserSession rows on chat deletion
- Increase Kernel timeout from 1h to 24h (browser enters standby at zero cost when no CDP/live-view connections are active) - Update modal copy to explain session preservation behavior
…te modal copy Browser stop: replace per-session boolean flag with AbortController so stop signals propagate to queued and in-flight commands immediately, even when abort fires between tool calls. Modal: remove "After 1 day, your browser session will be permanently deleted" line per team discussion.
request.signal propagation is unreliable on Cloud Run with resumable streams/SSE. Instead of relying on it, the client now sends an explicit POST to /api/kernel-browser with action: 'stop' which directly aborts the session's AbortController and severs CDP.
…mselves The agent was sometimes selecting "applying on behalf of someone else" because the system prompt said "on behalf of caseworkers". Clarified that the caseworker is with the participant filling out their own application, and added explicit rule to always answer "Yes" to "applying for yourself?" questions.
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.
No description provided.