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
This was written agentically; verify its assertions:
Why
On Claude Code, agent-kit's PreToolUse/PostToolUse hooks provide the write-boundary guard and the paths-touched.ndjson forensic evidence that parallel-issues' cross-write Collect check depends on. Under OpenCode those hooks never fire, so a dispatched worker runs with no ownership-boundary evidence at all — the Collect check degrades to mtime archaeology.
What
Port the guard layer to OpenCode's typings-verified hooks: tool.execute.before (record + optionally refuse a content-bearing write whose target escapes the contracted worktree) and tool.execute.after (append the same paths-touched.ndjson record shape the Claude hooks write, so cross-write-check.sh consumes one format).
permission.ask hook: surface (not silently allow) out-of-boundary writes when interactive; degrade to record-only when unattended.
Reuse the guard shell helpers where possible by invoking them from the plugin ($ Bun shell) rather than reimplementing matching logic in JS; where JS-side matching is unavoidable, pin parity with fixture tests shared across both implementations.
Acceptance
A write inside the worktree under OpenCode produces a paths-touched.ndjson record identical in shape to the Claude-hook record (fixture diff test)
An out-of-worktree write is recorded and surfaced per the mode (interactive ask / unattended record)
This was written agentically; verify its assertions:
Why
On Claude Code, agent-kit's PreToolUse/PostToolUse hooks provide the write-boundary guard and the
paths-touched.ndjsonforensic evidence that parallel-issues' cross-write Collect check depends on. Under OpenCode those hooks never fire, so a dispatched worker runs with no ownership-boundary evidence at all — the Collect check degrades to mtime archaeology.What
tool.execute.before(record + optionally refuse a content-bearing write whose target escapes the contracted worktree) andtool.execute.after(append the samepaths-touched.ndjsonrecord shape the Claude hooks write, socross-write-check.shconsumes one format).permission.askhook: surface (not silently allow) out-of-boundary writes when interactive; degrade to record-only when unattended.$Bun shell) rather than reimplementing matching logic in JS; where JS-side matching is unavoidable, pin parity with fixture tests shared across both implementations.Acceptance
paths-touched.ndjsonrecord identical in shape to the Claude-hook record (fixture diff test)cross-write-check.sh collectconsumes OpenCode-produced evidence unchangedBlocked by the contract-injection slice (S3).
🤖 Co-authored by Claude Fable 5.