Skip to content

Daemon: client request waits (approve_step, wait) join the run loop's wake-up schedule #406

Closed

Description

@lydakis

Left over from #393 (Codex finding #393 (comment)).

While a client waits on a request, the daemon keeps something live for it. An approve_step request holds one small task until its step is decided. It also holds a timer while a gate's expiry is running. A client wait with a deadline holds a timer task of its own (handles.rs attach). The bot itself parks durably either way. But AGENTS.md says the run loop owns the one wake-up schedule, and per-request tasks and timers grow with the number of open requests.

Plan, as agreed with the owner: move both kinds of wait into the run loop. The schedule holds a request's deadline next to the turns' wakes. A decision or a lapse settles the waiting reply from there, so no request has a task or timer of its own. Session close and turn end go through the same path.

Activity

  1. added a commit that references this issue on Oct 30, 2026
    8e62114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions