patchcord 0.6.42 → 0.6.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,48 @@ User invoked /patchcord:subscribe — do NOT substitute `wait_for_message()`. Sp
30
30
 
31
31
  3. **Tell the user one line:** *"Patchcord listener active — I'll pick up new messages as they arrive."*
32
32
 
33
+ # IF YOUR HARNESS HAS NO `Monitor` TOOL — READ THIS BEFORE STEP 2
34
+
35
+ `Monitor` is a Claude Code tool. Step 2 above assumes it, and the assumption is
36
+ load-bearing rather than stylistic: Monitor turns EVERY stdout line into a
37
+ notification, which is what makes a message arriving wake you.
38
+
39
+ Other harnesses run a background command instead (`bash` with
40
+ `run_in_background: true`, or your harness's equivalent), and those typically
41
+ notify on a STALL — no output for N seconds — not on each line. On such a
42
+ harness, following step 2 verbatim produces a listener that WORKS and NEVER
43
+ WAKES YOU: the pipe fills with messages you are never told about, and you
44
+ discover them only when the user asks why you did not answer. That has happened
45
+ in production, on jcode, and is the reason this section exists.
46
+
47
+ So, if you have no `Monitor`:
48
+
49
+ 1. **Set the stall wake.** Whatever your harness calls it — jcode uses
50
+ `stall_wake_seconds: 30` — you MUST set it. Without it the background task
51
+ is silent by construction and you get zero notifications, no error, and no
52
+ sign that anything is wrong.
53
+
54
+ 2. **Understand what the wake means, and what it does not.** The stall fires
55
+ because the pipe went QUIET, not because a message arrived. The `grep` filter
56
+ in step 2 drops the 30 s heartbeats, which is exactly what makes the pipe
57
+ look idle — so you will be woken on a timer, whether or not anything came in.
58
+ Treat every wake as "go and check", never as "there is a message".
59
+
60
+ 3. **NEVER read the last `PATCHCORD:` line in the task output as news.** It is
61
+ scrollback. It may be the same line you already handled minutes ago. The
62
+ inbox is the source of truth: on each wake call `mcp__patchcord__inbox`, and
63
+ if it is empty, say nothing and go back to waiting. An agent that announces a
64
+ message because it re-read an old line is worse than one that misses it.
65
+
66
+ 4. **The noise is the cost of delivery, and it is the right trade.** A wake
67
+ every N seconds with nothing to report is cheap. A missed message is not.
68
+ Raise the interval if the user asks; do not remove it.
69
+
70
+ This degrades push into a timed poll on those harnesses. That is honest and it
71
+ works. Do not pretend otherwise to the user, and do not tell them you will be
72
+ woken "as messages arrive" if your harness cannot do that — say you will check
73
+ regularly.
74
+
33
75
  # When a notification fires
34
76
 
35
77
  Monitor surfaces `PATCHCORD: 1 new from <sender>`: