diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 01:14:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 01:14:46 -0500 |
| commit | f8bdf302fd71ba73ae1424d86275e1e223f09cf3 (patch) | |
| tree | 4f46c33a70d89ecb939d5f87c5fed3412515be58 /claude-templates/.ai/scripts/cross-agent-comms/cross-agent-send.md | |
| parent | e0f914d510c081db45cafaf4fe5c8f7b65e46fec (diff) | |
| download | rulesets-main.tar.gz rulesets-main.zip | |
agent-roster is the single detection primitive for concurrent same-project Claude sessions: pgrep -x claude, resolve each pid's cwd from /proc, keep those at or inside the project root, and drop the scanner's own ancestry. It exits 0 when alone, 1 when other agents are present (printed pid + cwd), and 2 when the roster can't run. Both the helper launcher and the in-session startup check will call this rather than re-scanning.
pgrep and /proc are the system boundary, so I made them injectable (ROSTER_PGREP, ROSTER_PROC, ROSTER_SELF_PID) and the bats exercise the real include/exclude logic against fixtures, no agents spawned. The unavailable paths (no /proc, or pgrep absent) report on stderr and exit 2 rather than a false "alone".
This is the first slice of the helper-instance task. Startup and ai --helper wiring follow.
Diffstat (limited to 'claude-templates/.ai/scripts/cross-agent-comms/cross-agent-send.md')
0 files changed, 0 insertions, 0 deletions
