Repository navigation
RFC: Group Coordination #757
ribeirojose
started this conversation in
Ideas
Replies: 2 comments
|
@ribeirojose this is absolutely needed. coordination today is a note in text that nothing enforces, and what agents do to each other leaves no trace, so both halves of this land on real pain. i want to read it properly before getting into the open questions, but it goes on our list for sure. thanks again for all the work and care you put into this! |
0 replies
|
@ribeirojose thanks for this, read it properly now. Reach is welcome as a PR, on its own and kept small. On the questions:
Two things since you wrote it: #813 landed, so |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why
Interruptions. Any session can message any other.
internal/execution/polldelivery.go).polldelivery.go:62-66). Nothing limits who can send.read,waiton orkillany session, andspawninto any group.Experiments. I'd like to put a few agents in a group, give them a task, and have them coordinate only with each other while I watch. That's the same problem from the other side.
Visibility. What agents do to each other is hard to see and isn't kept.
✉N,internal/ui/theme_styles.go:245), not who sent what, what a message started, or which agent spawned which.ParentIDonly nests terminals under a session.internal/sessioncmd/owner.go:70).internal/store/sessions.go:600).internal/store/tasks.go:79-133).Note: This assumes #735 lands as is. File references are permalinks to that branch at
cebd90c.Principles
AGENT_MANAGER_SESSION_ID(internal/hooks/hooks.go:29) and call the CLI as a script, openstate.db, or runtmux send-keys. Reach keeps well-behaved agents from stepping on each other; it doesn't contain a hostile agent. The docs and UI should say so.Where things are today
Coordination mode ("on request" or "proactive") is one global setting (
internal/store/settings.go:52). It reaches an agent in one of two ways:internal/mcpserver/mcpserver.go:821-828).internal/launch/launch.go:38-41).It is guidance in text mostly w/o enforcement though.
Groups already carry settings that resolve from the nearest ancestor:
worktreeandbase(internal/sessioncmd/spawn.go:174-222). Spawn without a group lands in the caller's group (spawn.go:26-28).Tasks have no group (
internal/store/tasks.go).Inbox limits are global: a queue of 20, 5 per minute, and 8 per pair per 10 minutes (
internal/store/inbox.go:41-48).No-session callers. Commands that accept a caller with no session serve scripts outside Agent Manager (
optionalCaller,internal/sessioncmd/runtime.go:119).Reach
Commands that touch another session fall into two kinds:
sessions/list_sessions,groups/list_groups,read,wait,message_status, and listing terminals.send,spawninto a group, kill, revive, archive, rename, and task changes.Interruptions come from acting. Seeing is mostly harmless and often useful, for example an agent reading a sibling's screen before starting the same work.
A group or a single session can set
reach:open(default)quietclosedProposed rule. A session's scope is the innermost group or session around it whose reach isn't
open, or the whole profile when there is none.closedboundary separates them.closedsubgroup inside aquietgroup is its own scope.What follows from the rule:
quietis "do not disturb": other agents can still see it, but none can message, kill or spawn into it. It doesn't have to move in the tree.spawn.go:26-28). Spawning into a group outside the scope is refused. The same goes for creating groups.m,internal/keybind/keybind.go:302); there's no CLI or MCP move. So an agent can't leave a boundary on its own. Any future move command for agents should check reach at both ends.create_groupfrom an agent inherits its parent's reach. Setting reach is a human action, in the TUI or from a shell with no session.What agents see.
Coordination mode per group
A group can set the mode. It resolves like
worktreeandbase, falling back to the global setting. The MCP server and the launch note read it from the caller's group. A change applies to sessions launched afterward and to any session whose MCP server restarts, as global changes do today.Activity log
This is a record of what crossed between sessions. It's useful every day, not just in experiments:
The log is append-only, so pruning the inbox or deleting a session doesn't erase history.
agent-manager log --group <g>exports JSONL. The export lists each member's tool, conversation id and working directory, since most of an agent's reasoning lives in its own transcript.Views come after the data, and none prescribe a structure:
Stages
Each stage merges on its own.
Interaction with other work
send --from). Treating it as the human would let it bypass every boundary. External senders should reach onlyopenscopes.docs/architecture/boundaries.md:35). Members on different hosts reaching each other doesn't: each host's manager only knows its own sessions, and replies would have to flow back from host to controller. That's a stretch for this project and stays out of scope here, but nothing above should block it.Not in scope
Open questions
quietblock only incoming actions, so members can still message out, or both directions as proposed?state.dbor JSONL under the profile directory, and how large it may grow?All reactions