Skip to content

codex: map sleep items to a tool call so hosts can show waits #83

Closed

Description

@xxchan

Codex (app-server) now emits sleep items when the model waits, e.g. after "sleep 100":

{"type":"item/started","native":{"item":{"type":"sleep","id":"call_rorJ…","durationMs":50000},"turnId":"…","startedAtMs":1791015508662}}
{"type":"item/completed","native":{"item":{"type":"sleep","id":"call_rorJ…","durationMs":50000},"turnId":"…","completedAtMs":1791015516209}}

The codex adapter emits no events for them. A UI therefore shows nothing between "I'll wait 100 s" and the next message. It also cannot tell that a steer cut the wait short: this one completed after 7.5 s of its 50 s, when a steer arrived.

Suggestion (scope agreed with @cindy in #82's discussion): map a sleep item to a tool call. tool_call_started would carry {durationMs} as input, and tool_call_ended would be ok on completion. A host can then render "Waited 8 s of 50 s" with the usual tool-part machinery.

Activity

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