Give background agents awareness of peer agents in the same repo
Background agents working in the same repo don't really know about each other, or even that they're in agent mode at all. The harness handles potential collisions by force-isolating every background session into a worktree (#21236), which doesn't always fit and is invisible to git tooling like GitButler.
Alternative: just give each background agent some context about other live sessions and where they're working — could be a passive section in the system prompt, or a tool the agent can call on demand. Implementation up to you. Plus a clear signal that this session is in agent mode in the first place.
With that, agents can reason about collisions themselves instead of being pre-emptively isolated. Forced isolation can stay as the default; this just adds the information that lets agents make a better call when appropriate.
Bonus: the Agents panel could surface the same peer state to humans for real situational awareness.
Related: #21236 (worktree opt-out), #24798 (inter-session IPC), #59112 / #59413 (bg session permission mode).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗