You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a reaction arrives while a background task is running, the reaction message gets piped into the background task's active agent query instead of only reaching the message lane.
Observed behavior
Logs from a session where the task lane was running an accessibility audit and a 💚 reaction came in:
[agent-runner] [msg #98] tool=Bash grep -n "sr-only" ... ← task lane working
[agent-runner] [msg #99] type=user
Reaction on bot message in Discord ← reaction arrives
[agent-runner] Piping IPC message into active query (164 chars) ← LEAKED into task
[agent-runner] [msg #10] type=system/init ← message lane also spins up
[agent-runner] Session initialized: 47c712a1-...
The reaction was handled by both:
A new message-lane session (correct) — responded with <internal> no-response
The running task-lane agent (incorrect) — piped in via IPC, agent happened to ignore it
Expected behavior
Reactions (and all message-lane IPC) should only reach the message-lane container, never the task-lane container.
Root cause
queue.sendMessage() writes to the input/ IPC directory. Task containers are supposed to be isolated via an overlaid mount (input-task/ → /workspace/ipc/input/), but the reaction message still reached the task container's active query.
Relevant code:
Host write: group-queue.ts:231 — sendMessage() writes to data/ipc/{folder}/input/
Mount setup: local-backend.ts:147-162 — task containers mount input-task/ over input/
The mount overlay (input-task/ → /workspace/ipc/input/) may not fully isolate the directories, possibly due to Apple Container mount ordering or timing.
Impact
Low severity now: Reactions generate short messages the agent tends to ignore
High severity potential: If a user sends a real message while a task is running, the message content could be injected into the task agent's context, causing it to act on unrelated instructions mid-task
Possible fixes
Verify mount isolation: Debug whether the Apple Container overlaid mount actually shadows input/ for task containers — may need container exec to confirm
Separate directory trees entirely: Instead of mount overlays, use completely separate IPC root dirs per lane (e.g., ipc-message/ and ipc-task/) and pass the path via env var to the agent-runner
Lane-aware IPC polling: Add a NANOCLAW_IPC_LANE env var so the agent-runner knows which subdirectory to poll, rather than hardcoding /workspace/ipc/input
Bug
When a reaction arrives while a background task is running, the reaction message gets piped into the background task's active agent query instead of only reaching the message lane.
Observed behavior
Logs from a session where the task lane was running an accessibility audit and a 💚 reaction came in:
The reaction was handled by both:
<internal>no-responseExpected behavior
Reactions (and all message-lane IPC) should only reach the message-lane container, never the task-lane container.
Root cause
queue.sendMessage()writes to theinput/IPC directory. Task containers are supposed to be isolated via an overlaid mount (input-task/→/workspace/ipc/input/), but the reaction message still reached the task container's active query.Relevant code:
group-queue.ts:231—sendMessage()writes todata/ipc/{folder}/input/local-backend.ts:147-162— task containers mountinput-task/overinput/agent-runner/src/index.ts:512-516—drainIpcInput()polls/workspace/ipc/input/The mount overlay (
input-task/→/workspace/ipc/input/) may not fully isolate the directories, possibly due to Apple Container mount ordering or timing.Impact
Possible fixes
input/for task containers — may needcontainer execto confirmipc-message/andipc-task/) and pass the path via env var to the agent-runnerNANOCLAW_IPC_LANEenv var so the agent-runner knows which subdirectory to poll, rather than hardcoding/workspace/ipc/input