Feature hasn't been suggested before.
Describe the enhancement you want to request
I'd like a supported way for agents to wait and then continue the same session automatically, without needing another user message.
My use case was simple: "wait two hours before starting this task." On V2.0.24, the agent launched a background sleep 7200 and said it would resume automatically. About an hour later, OpenCode evicted the project's services for inactivity. The background shell disappeared, no completion notification arrived, and the session never continued. Its persisted background-job marker was still running.
The relevant idle-cleanup and notification lifecycle code is unchanged in V2.0.25 and v2 at a67cf4c. This was observed once; the version comparison was source inspection, not a reproduction on V2.0.25.
I'm not specifically asking to increase the internal inactivity limit or prescribing a sleep tool, scheduler, or API. The capability I want is to tell an agent "continue in two hours" and trust that it will do so. It would also help with delayed retries and checking CI or PR reviews later.
An intentional wait shouldn't be mistaken for abandoned work or require repeated model calls just to stay alive. The pending wait should be visible and cancellable. Behavior across service shutdown/restart should be explicit; if a wait cannot resume, it should report that rather than silently disappear.
Related closed requests: #20486 (short sleep tool), #20874 (sleep/autonomous tick loop), and #25395 (scheduled tasks). This is about an agent's one-off continuation in an existing V2 session, not necessarily recurring jobs or manual pause/resume.
Environment: release/latest V2.0.24, Linux x86_64 (kernel 7.0.0-34-generic), Bash, TERM=xterm-256color. Terminal application unavailable. One custom plugin was active: visible-session-tabs.server.
Feature hasn't been suggested before.
Describe the enhancement you want to request
I'd like a supported way for agents to wait and then continue the same session automatically, without needing another user message.
My use case was simple: "wait two hours before starting this task." On V2.0.24, the agent launched a background
sleep 7200and said it would resume automatically. About an hour later, OpenCode evicted the project's services for inactivity. The background shell disappeared, no completion notification arrived, and the session never continued. Its persisted background-job marker was stillrunning.The relevant idle-cleanup and notification lifecycle code is unchanged in V2.0.25 and
v2at a67cf4c. This was observed once; the version comparison was source inspection, not a reproduction on V2.0.25.I'm not specifically asking to increase the internal inactivity limit or prescribing a sleep tool, scheduler, or API. The capability I want is to tell an agent "continue in two hours" and trust that it will do so. It would also help with delayed retries and checking CI or PR reviews later.
An intentional wait shouldn't be mistaken for abandoned work or require repeated model calls just to stay alive. The pending wait should be visible and cancellable. Behavior across service shutdown/restart should be explicit; if a wait cannot resume, it should report that rather than silently disappear.
Related closed requests: #20486 (short sleep tool), #20874 (sleep/autonomous tick loop), and #25395 (scheduled tasks). This is about an agent's one-off continuation in an existing V2 session, not necessarily recurring jobs or manual pause/resume.
Environment: release/latest V2.0.24, Linux x86_64 (kernel 7.0.0-34-generic), Bash, TERM=xterm-256color. Terminal application unavailable. One custom plugin was active:
visible-session-tabs.server.