Audit machine-authored Managed Child instructions - #176
Merged
Merged
Conversation
This was referenced Aug 25, 2026
leoncheng57
force-pushed
the
docs/subagent-capabilities
branch
from
August 26, 2026 01:08
c9cfb45 to
7a30bc4
Compare
leoncheng57
force-pushed
the
feat/subagent-instruction-rows
branch
from
August 26, 2026 01:15
afb86ed to
9cd5e89
Compare
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #170. Closes #91 for the observable lane.
What
An explicit send-time audit ledger for machine-authored instructions this app sends to child sessions, rendered as machine-authored rows in the delegated-work panel — never as human chat bubbles, and never inferred from transcript wording.
Design (follows the issue's contract requirements)
acknowledged(prompt_async 204) orrejected(safe reason: config verification failure or upstream error).queuednever persists because the BFF holds no queue.opencode-subagent-instruction-coverage) instead of fabricating records — the issue's explicit fallback when no audit source exists..state/instruction-audit.json(INSTRUCTION_AUDIT_FILE), 0600, atomic serialized writes, capped at 500, corrupt file starts empty (losing audit history must never block the prompt path). Recording is fire-and-forget so it can never fail the send it audits.SubagentReport; each child row lists its instructions, and records whose child was cleaned up after a failed launch appear in an orphan section — the audit outlives the session it addressed.Testing
tests/instruction-audit.test.ts: redaction cases, bounded text, persistence round-trip, corrupt-file recovery, retention cap, malformed-entry filtering.