You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core: session warming should target sessions currently open in the client #41003
V2 session warming currently appears to be globally enabled and based on a fixed time window. When warming is enabled, any session that receives a prompt is kept warm for approximately 30 minutes, even if it is no longer open or being viewed in the client.
This may cause unnecessary model requests and resource usage, especially when only a small number of sessions actually need to remain warm.
Environment
opencode version: opencode2 v0.0.0-next-16927
OS: Linux 6.6.87.2-microsoft-standard-WSL2 (WSL2, linux x64)
Terminal: TERM=xterm-256color; terminal program and color terminal are unavailable
Shell: /bin/bash
Install/channel: next
Active plugins: /home/wuyao/.config/opencode/plugins/slim-tools.ts
Reproduction
Enable V2 session warming globally with "warming": true in the opencode configuration.
Send a prompt in one or more sessions.
Close or stop viewing one of those sessions while leaving the opencode client running.
Wait during the configured warming duration, which defaults to approximately 30 minutes.
Observe that the session continues to receive periodic keep-alive model requests.
Expected Behavior
Session warming should preferably target only sessions that are currently open in the client, since those are the sessions most likely to require preserved provider-side prompt caches or other short-lived session state.
It would also be useful to support per-session warming configuration or an explicit client-to-server list of sessions that should remain warm.
Actual Behavior
Session warming is configured globally and appears to identify sessions as warmable based on whether they recently received a prompt. The default duration is approximately 30 minutes, regardless of whether the session is still open in the client.
This definition of “recently active session” may be broader than necessary and can result in keep-alive requests for sessions that are no longer in use.
Additional Context
The current warming configuration exposes a global setting and a duration:
warming: globally enables or disables warming
warming.duration: time after the last active request to keep a session warm, defaulting to 30 minutes
warming.interval: interval between keep-alive requests, defaulting to 4 minutes
A possible improvement would be to use the client’s currently open session state as the primary warming criterion, while retaining an explicit configuration option for background or multi-client use cases.
No error or stack trace is available. The behavior is expected to be consistent whenever warming is enabled.
Activity
github-actions commentedon Oct 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.