Skip to content

feat: sleep tool and autonomous tick loop #20874

Closed as not planned
Closed as not planned

Description

@sebamar88

Problem

The agent can't wait for external processes or continue working autonomously between user interactions. Long-running tasks (CI, builds, polling) require constant user prompting.

Proposed approach

Two additions:

  1. Sleep tool (src/tool/sleep.ts) — pauses execution for N seconds. Simple, useful immediately for polling loops within a single session.
  2. Autonomous tick loop — a background wakeup mechanism that re-enters the agent loop after a configurable interval when the session is in an autonomous mode.

The sleep tool is self-contained. The tick loop requires client UI support to show status and depends on the detached subtask work (separate issue).

Why it belongs here

Without wait/sleep, the agent can't implement patterns like "run build, wait for it, then check output". The tick loop extends this to fully autonomous sessions.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 3, 2026
  2. github-actions commented on Apr 3, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. Feature requests must use the Feature Request template, which requires a verification checkbox confirming the feature hasn't been suggested before, and the title should start with [FEATURE]:

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Apr 3, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions