Skip to content

Turns with many agents: the question and the answer in sight, one wait for all, no message lost, notifications - #22

Merged
ngodzik merged 5 commits into
mainfrom
many-agents
Nov 14, 2026
Merged

ngodzik merged 5 commits into
mainfrom
many-agents

Conversation

@ngodzik

@ngodzik ngodzik commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Turns with many agents: a conversation that keeps the question and the answer, one wait for all, no message lost, and notifications.

What

  • A message posted while its reader's last call ran wakes it once its turn ends, as it would have woken it resting: the person's, iq's, or that of an agent it started or one retired since, at once; a peer's under the same limit as when it rests, so that two agents writing to each other at their turns' ends do not wake each other forever.
  • wait_for_messages with until_done: true waits until none of the agents an agent started works, or one asks it something, ten minutes at most, then gives all they wrote at once, once the board stayed quiet 300 ms.
  • What agents write to each other, their tasks too, stays out of the conversation. The turn's strip (turn_view = "strip") shows the latest ten, a line each, the earlier counted; a turn of the person's chat in which other agents worked ends with one line summing it up (agents by model, messages, calls, cost, the key to every step). The summarizer is asked for one line of fifteen words. The steps' page keeps everything whole. Not done: the panes show no messages, and an agent's line saying it joined stays.
  • Ctrl-P (notify) turns on a notification of the system's as a question waits ("Waiting for you") and as a turn of the person's ends ("Turn done", which turns it off), shown in the status line while on, never a word of the work: notify-send on Linux (which needs a notification daemon), osascript on macOS.

Checked

Every commit passes scripts/check.sh; the wake at a turn's end has a test that fails without it. Not checked live: the notifications (no notification daemon in the nested X server used), the strip and the turn's line with real agents.

Stacked on #21: merge it first.

A turn that ended woke its agent again only for the person's messages.
An answer from an agent it started, posted while its last call ran,
waited unread until something else woke it, and was lost if iq started
again in between, as the board's messages are not kept.

A turn that ends now wakes its agent for what was written to it since
it last read the board, as a message would have woken it resting: the
person's, iq's, or that of an agent it started or one retired since, at
once; a peer's at work under the same limit as when it rests, so that
two agents writing to each other at their turns' ends do not wake each
other forever.
An agent that starts several was woken, and read its whole conversation
again, at every message they wrote: most of such an agent's calls were
waits.

`wait_for_messages` with `until_done: true` waits until none of the
agents it started works, or one asks it something it has not read, ten
minutes at most, then gives all they wrote at once, once the board
stayed quiet 300 ms, as an agent rests just before its answer is posted.
…ges the strip

A turn with half a dozen agents wrote every task and message between
them into the conversation, several lines each, burying what the person
asked and what they were answered.

What agents write to each other, their tasks too, now stays out of the
conversation, kept per chat for its turn. The turn's strip (`turn_view
= "strip"`) shows the latest ten, a line each, the earlier counted. A
turn of the person's chat in which other agents worked ends with one
line that sums it up: the agents by model, the messages, the calls, the
cost, and the key to every step. The summarizer is asked for one line
of fifteen words at most. The steps' page still has everything whole.

Not done: the panes show no messages, and an agent's line saying it
joined stays in the conversation.
…aits

A long turn runs while the person is elsewhere, and nothing told them
it ended.

Ctrl-P (`notify` in `[keys]`) turns notifications on, before or during
a turn, and off again; the status line says so while they are on. A
notification comes as a question waits ("Waiting for you") and as a turn
of the person's ends, once none of its chat's agents works ("Turn done",
which also turns them off). Its words are iq's own, never the work's, as
a screen may be shared. It goes through the system's own tool, on a
thread of its own and with iq in front too, as the person may be away
from the screen: `notify-send` on Linux, which needs a notification
daemon, `osascript` on macOS, where a terminal's own escape showed
nothing until the system allowed its notifications.
The test of the messages kept out of the conversation waited for the
summary of one of them only: the other, made on a thread of its own,
could come later, and the test failed now and then.
@ngodzik
ngodzik changed the base branch from calls-and-leads to main November 14, 2026 20:41
@ngodzik
ngodzik merged commit 2cea644 into main Nov 14, 2026
11 of 15 checks passed
@ngodzik
ngodzik deleted the many-agents branch November 14, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant