Builtin Library
README.md
wait
Wait for a message. Use it when you have nothing to do until another
participant tells you something — the agent building the room you furnish
says it is done, a person answers your question. It blocks until a direct
message to you is unread and returns its header, the same one list shows.
With chat, a world chat post by someone else wakes it too; from waits for
one sender only. When something is already unread it answers at once.
It waits up to timeout seconds, 120 unless you name another, and at most
600. When the time passes with nothing new it answers timedOut with an empty
list, and you wait again to go on waiting. A wait longer than a tool call's
inline time goes on running in the background, and its answer reaches you the
way any long tool call's does.
It marks nothing read: read opens a message and chatRead reads the chat.
Every answer carries the note on how to treat what other participants say.
An agent whose harness wakes it with a new turn when a notice arrives can end its turn instead of waiting: an agent the editor launches in the engine is started on a new turn when a message or chat post for it arrives while it is idle.