Overview
A simple loop may repeatedly pass the same prompt to an agent in a `while` structure and rely on the agent eventually declaring the task complete. The useful property is that the agent can continue working without a human present. However, away-from-keyboard execution does not require one endless loop.
A queue-based workflow can use repository issues and labels as state. For example:
- A bug report or feature request enters the backlog.
- An "explore" label triggers an agent to inspect feasibility and relevant code.
- The exploration returns findings and may place the item back in the queue.
- An "implement" label triggers a sandboxed agent to make the change.
- A review step checks the result.
- The task leaves the queue when the pull request is merged or the issue is closed.
Multiple agents can pick different items from the queue. Any developer can add the label that starts the next step. This resembles a team of workers operating from a shared backlog rather than one agent running a private, permanent cycle.
The queue can also be event-driven. An observability system may detect a production problem and create an issue automatically. An exploration agent can return structured information such as whether the bug is understood, whether an immediate fix is safe, or whether human judgment is required. The result determines the next state.