Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Merge #894: diagnose clipboard failures and bound helper execution

justrachd67ae7a6d213
diff --cc docs/adr/0113-clipboard-errors-need-evidence.md
index 00000000,0da8fe32..7592f873
mode 000000,100644..100644
--- a/docs/adr/0113-clipboard-errors-need-evidence.md
+++ b/docs/adr/0113-clipboard-errors-need-evidence.md
@@@ -1,0 -1,31 +1,31 @@@
-# 0111. Clipboard failures do not imply Automation permission
++# 0113. Clipboard failures do not imply Automation permission
+
+ Status: accepted 2026-09-14
+
+ ## Context
+
+ Clipboard helper launch failures, timeouts, invalid output, and repeated
+ pasteboard changes all produced advice to grant Automation access (#883).
+ The exporter already uses AppKit directly through the system JXA runtime;
+ it does not send Apple Events to another application. Named-pasteboard
+ regressions exercise the real exporter without modifying the general board.
+
+ ## Decision
+
+ Keep direct AppKit extraction and its image-flavor fallback. Do not introduce
+ application scripting or ask users to change Automation permissions for a
+ generic helper failure. Classify bounded process results before decoding the
+ export protocol, and identify denial only from an explicit, complete system
+ error. Never display helper stderr or clipboard contents in diagnostics.
+
+ Expose launch failure, timeout, clipboard churn, export failure, and conversion
+ failure separately. Offer retry and the existing terminal text-paste or
+ `/image <path>` workflows rather than inventing a permission requirement.
+
+ ## Consequences
+
+ `osascript` remains the system JXA host, not an Automation target. This avoids
+ adding a platform-specific linked helper or runtime compiler dependency.
+ Unknown failures remain neutral read errors; they do not establish which
+ macOS privacy setting, if any, applies. Tests use private named pasteboards and
+ injected process failures, so normal clipboard contents remain untouched.
diff --cc docs/adr/README.md
index 616c7a06,302aed5a..eacbf395
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@@ -121,8 -121,7 +121,9 @@@ record only when you need the evidence
| [0108](0108-browser-events-outrank-pending-snapshots.md) | Browser page-info events invalidate older pending IPC snapshots; a loaded page must not revert to loading. |
| [0109](0109-resume-retains-catalog-and-layout-snapshots.md) | Resume restores loaded tool selections and the same-workspace layout snapshot, without freezing current instructions or granting permissions. |
| [0110](0110-project-mcp-listing-opts-in-optional-servers.md) | Project MCP entries opt in optional servers; inherited extras still require opt-in, and startup consent applies to both. |
- | [0112](0112-mcp-wire-names-preserve-raw-routing.md) | MCP wire names are escaped and bounded; raw server/tool identities control policy and dispatch. |
-| [0111](0111-clipboard-errors-need-evidence.md) | Direct AppKit clipboard failures need typed evidence; generic helper failures never imply Automation permission. |
+| [0111](0111-peer-inbox-retains-bodies-and-reports-loss.md) | Peer inbox owns complete bodies, reports and persists loss, and clears only after a complete read result is allocated. |
++| [0112](0112-mcp-wire-names-preserve-raw-routing.md) | MCP wire names are escaped and bounded; raw server/tool identities control policy and dispatch. |
++| [0113](0113-clipboard-errors-need-evidence.md) | Direct AppKit clipboard failures need typed evidence; generic helper failures never imply Automation permission. |
## When to write one