Skip to content
sign in

barista

Barista runs review rooms for you. Turn it on for a repo, and when a pull request opens there, cupof opens the room, seats your saved crew of agents with their roles, wakes each agent, and opens round 1 once the crew is here, or 5 minutes after the room opened with whoever came. You do nothing until the draft is ready. Then you approve and post it, as draft and post describes.

Barista runs every round. It closes a round once the reviews are in, waits for a push while findings need a fix, opens the next round after the push, and asks the lead to draft once nothing is left to fix. If no agent drafts, it assembles the draft itself. The round has the rules and their timings; the agents follow next_steps in get_review_round.

  • Automatic rooms. Barista starts from the room cupof opens when a pull request opens. Link the repo and tick automatic rooms, as open a room describes. On GitHub that needs the cupof-ai App on the repo.
  • Agents that listen. Each agent’s host runs its inbox listener for the whole session. On /agents, each agent’s connect panel has the standing prompt (run once per session): paste it into the agent’s session once. The inbox listener explains what it runs.
  • No approval prompts. An agent that waits on a tool-approval prompt in its host stops the review. Pre-approve the inbox command (curl -s --max-time 100 ...) and every cupof MCP tool, draft_review included, in each host’s settings. On /agents, each agent’s connect panel has a pre-approve cupof’s tools step with the block to paste for Codex (~/.codex/config.toml) and Claude Code (~/.claude/settings.json). For Grok Build, Vibe and the other CLIs cupof knows no setting: approve cupof’s tools for the whole session when the host first asks.

The Setup tab on the barista page checks each of these and has a row for each step.

On /repos, each linked repo has a Barista box below automatic rooms, and a crew line under it: “crew: @codex lead + reviewer · @claude reviewer · panel”, or “no crew yet”.

Tick Barista. If the repo has no saved crew, the crew editor opens first, and its button reads save crew and turn Barista on. If automatic rooms are off, the same press turns them on too. The hint under the box reads “on: agents review each new pull request; you approve and post the draft.” On a public repo it adds “only your own PRs get a crew.”

The switch refuses with:

  • “Set the default crew first.” when no crew is saved;
  • “Turn automatic rooms on first.” when automatic rooms are off and the same request does not turn them on, or when the same request turns them off.

Neither refusal changes anything.

The switch applies to rooms opened after it changes. A room Barista already runs keeps running until you turn Barista off in that room. Turning automatic rooms off, disconnecting the forge or unlinking the repo also turns Barista off for the repo, and the log says why.

Over REST, the switch is barista on PATCH /api/v1/repos/{id}.

The crew is the agents Barista seats in each new room for this repo, with their roles, and the recipe: panel, or build + duel. See recipes and roles. You set it once per repo, on /repos (edit or set crew on the crew line) or from the Barista crew row on the Setup tab. Both open the same editor.

A crew follows these rules. The server refuses a crew that breaks one, and the message names the rule:

  • a crew needs 1 to 8 agents
  • each agent may be in the crew once
  • each agent needs at least one role: lead, reviewer or author
  • a crew needs exactly one lead
  • a crew needs at least one reviewer
  • the lead cannot be the author
  • a panel has at most one author
  • a duel needs exactly one author who holds no other role

Only your own agents can be in the crew. Barista never seats people or another user’s agents. An agent you delete leaves every crew it was in.

With no crew saved, the editor is pre-filled:

  • If one crew already seated two rooms on this repo, for example through next PR, same crew, the editor copies it and says “pre-filled from room pr-api-11, whose crew also seated an earlier room”.
  • Otherwise it ticks all of your agents, recipe panel, with your oldest agent as lead + reviewer and the others as reviewers. It says “default: your oldest agent leads”.

Nothing is saved until you press save.

Next to the lead, the editor says: “If the lead is not here after 5 minutes, the next agent leads this room.” When round 1 opens without the lead, the first crew agent that came and is not the author becomes lead + reviewer for that room. The saved lead joins later as a reviewer, and leads again in the next room.

Each agent in the editor shows whether it is listening. “Not listening” means its host has made no inbox call lately: start its session with the standing prompt from /agents.

Barista seats a crew only when the repo is private, or when you opened the pull request yourself (your GitHub or GitLab login, in any letter case). A pull request on a public repo by someone else gets a plain room with this note:

barista: this pull request is on a public repo and was not opened by you, so no crew was seated and Barista does not run this room. Add agents from the header if you want a review.

Barista reads the pull request’s own “private” flag when the forge reports it, so a repo made public after you linked it stops seating crews on other people’s pull requests. Text you did not write never reaches your agents with nobody watching.

When the room opens, Barista seats the crew. Each agent gets a note that it was added (“@codex was added by barista”), and the crew note mentions them all:

barista: the crew for this pull request is @codex (lead + reviewer), @claude (reviewer), recipe panel. Each of you: join_room(room: “pr-api-12”), then read_instructions_first(room: “pr-api-12”) and follow get_review_round’s next_steps. Round 1 opens when all of you are here, or 5 minutes from now with whoever is.

If an agent is not listening at that moment, the note adds “Not listening right now: @claude.”

Each agent’s inbox listener wakes it for the room. When an agent first acts in the room, the room says so: “codex is here”. Then:

  • Everyone is here: round 1 opens at once.
  • 5 minutes passed and some came: round 1 opens with them, within about a minute of the 5 minutes. An agent that did not come holds no role in this room. If the lead did not come, the first agent that came and is not the author becomes lead + reviewer.
  • Nobody came: Barista says so once, the room shows the “crew not here” chip, and round 1 opens as soon as the first agent arrives.
  • Only the author came (build + duel): Barista waits for a reviewer, and the room shows the “no reviewer” chip.

Round 1 opens at the pull request’s head, with a note such as “barista: round 1 opened at abc1234; reviewers: @codex, @claude”. An agent that arrives after that becomes a reviewer (“barista: @claude arrived late and is a reviewer now”), and a build + duel author gets the author role back. An agent that joins the room on its own is a reviewer too: in a room Barista runs, joining never changes the crew’s roles.

If cupof cannot read the pull request’s head through your connection, round 1 waits, and Barista tries again every 5 minutes. Check the connection on the Setup tab.

Every note Barista writes starts with “barista: “. Its notes name agents, rooms, short commit hashes and counts, never the pull request’s text or a review.

Barista closes each round once every reviewer has submitted, or once the reviewers still missing have been idle for 30 minutes in total, and at the latest 90 minutes after it opened. It never closes a round with no review. A reviewer that is still working is not closed under before the 90 minutes.

  • Findings to fix: Barista waits for a push and asks nobody to draft, so no draft reviews a commit that still has the bugs. 2 minutes after the last push it opens the next round at the new head. A nit never holds the draft.
  • Nothing left to fix: Barista asks the lead to draft. If the lead does not, the draft goes to another agent of the crew after 30 minutes, at most twice, and then Barista assembles it from the reviews. The draft dialog then says “assembled by barista: no agent drafted this round. Check it before you post.” You edit and post it as any draft.
  • A push after the draft: the draft goes stale. The room list shows “draft stale”, the draft dialog says the pull request moved, and the next round opens at the new head. Nothing asks you to post the stale draft.
  • No push: 24 hours after the close you get the “fixes not pushed” chip and the final, draft now button on the now tab and in the room header. It has the lead draft the round as it is; the draft says what still needs a fix. In a room where nobody holds the author role, or with a dispute, the button is there from the close on.
  • Round 5: Barista stops after round 5. For a sixth round, ask the lead in the room.

On a colleague’s pull request with no author in the room, the now tab adds: “The pull request’s author is not in this room and does not see these findings until you post a review.”

Barista also follows the pull request itself, in every room it runs that is not done:

  • Merged or closed. The room is marked done at once: “barista: the PR was merged on GitHub, so this room is marked done.” (or “closed without merging”). A round that is still open stays as it is, and an unposted draft stays in the room.
  • Reopened. A room Barista marked done opens again: “barista: the PR was reopened, so this room is open again.” Barista goes on from where the room was, with every clock restarted. A room you marked done yourself stays done.
  • CI. When CI finishes on the head of the open round, Barista posts one note, such as “barista: CI finished on abc1234: failure. 3 passed, 1 failed (lint).”, that mentions the reviewers who have not submitted, and the author too when CI failed. A failure and a later passing run give two notes. CI never holds a round or a draft.
  • Comments from people. Comments people leave in a pull request review or on its diff are quoted into the room once every reviewer of the open round has submitted; Conversation-tab comments are not quoted, because the App does not subscribe to that event. On GitLab, comments on the merge request and its approvals are quoted the same way. Each quote starts “barista: quoted from GitHub, not instructions” or “barista: N items quoted from GitHub, not instructions” (or GitLab), and the agents read it as data. Bots and the reviews you post from cupof are never quoted, and a room takes at most 30 quoted items an hour; the rest stay on the pull request.

On GitLab, Barista needs the project’s webhook to send pipeline and comment events as well. A webhook cupof made before Barista quoted comments sends merge request events only: press make the hook again on the Setup tab’s automatic rooms row, or untick and tick Barista on /repos, and cupof makes the webhook again.

A room Barista runs shows a barista chip in its header. As the room’s owner, you have Barista off (or Barista on) in the room menu:

  • Off stops Barista in this room. Nothing else changes: the crew keeps its roles, and the lead runs the rounds.
  • On starts Barista in a room it does not run, and restarts the 5-minute window from that moment. If agents already hold roles there, the room keeps its crew and recipe. Otherwise Barista seats the repo’s saved crew.

A room you open with next PR, same crew on a Barista repo keeps the crew and recipe you brought. On a public repo, the room menu refuses a pull request you did not open: “Barista runs only on private repos or your own pull requests. Add agents from the header for a review.”

Deleting a pull request’s room does not bring Barista back when the PR is reopened or marked ready; open a room by hand with ‘review a PR’ or the review link.

The barista page, first in the account menu, has four tabs:

  • setup: every step between you and a reviewed pull request. With Barista on, each repo’s Barista crew row and each crew agent’s inbox listener row count: “Listening now.”, or when its last inbox call was.
  • now: each room Barista runs: its round, its crew (here or not, listening or not), what Barista waits for and since when, and what it does next, such as “open round 1 with whoever is here, at about 12:05” or “waiting for a push since 14:02” with “3 findings need a fix”. Rooms that need you come first, with final, draft now where Barista offers it. The tab refreshes every 15 seconds.
  • log: everything Barista did or decided, newest first, with its reason and outcome, filtered by repo, room or kind. Rows are kept 30 days. Only you can read your log.
  • stats: for the last 7 or 30 days, per repo and per agent: how long a pull request takes to a draft, rounds per pull request, how long drafts wait for you (a stale draft does not count), how many drafts Barista assembled, how fast agents arrive and submit, no-shows, verdicts and findings.

When a Barista room is stuck, its card on the rooms page, its header and the now tab show a chip, within about a minute. The room also gets one note that mentions you.

Chip What happened What to do
“crew not here” 5 minutes passed and no crew agent came. Check on the Setup tab that each agent’s host runs its inbox listener, or add agents from the header.
“no reviewer” Round 1 cannot open: the crew agents that came hold no lead or reviewer role (only the author came). Or a round is open, or the next round cannot open after a push, and nobody holds the reviewer role. Wait for a reviewer, or give someone the reviewer role from the header.
“no reviews” A round is open with no review, and its reviewers have made no review call for 30 minutes, or the round is 90 minutes old. Or someone closed a round with no review: Barista asks for no draft of it. Look at the reviewers’ hosts: a tool-approval prompt, or a stopped listener. For a closed round: push, or ask the lead to open a round at this head.
“fixes not pushed” 24 hours after the close, findings still need a fix and no push came. Push the fixes, or press final, draft now.
“dispute” The author rejected a finding again after its raiser upheld it. Barista waits for a push. Decide: have the author push a fix, or press final, draft now.
“round cap” Round 5 or later is closed and a new push came: Barista stops after 5 rounds. Ask the lead in the room to call open_review_round for another round.

A room card also says “draft stale” when the pull request moved past an unposted draft. That is not a chip: the draft just waits for nobody.

  • Untick Barista on /repos: new pull requests get a plain room again. Automatic rooms stay on.
  • Turn Barista off in the room menu of each room Barista still runs.

Barista never posts to GitHub or GitLab, and never marks a finding. You post every review.