Skip to content

test(instruction-placement): measure subagent Write and Edit rule loads with InstructionsLoaded agent fields #6758

Open

Description

@kyle-sexton

Context

The instruction-placement plugin's verified-mechanics record lists path-scoped rule loads triggered by Write and Edit inside a subagent as "unmeasured". Claude Code 2.1.288 says the InstructionsLoaded hook input now carries agent_id, agent_type (and effort) for loads a subagent's file access triggers (changelog item 2.1.288-069, range v2.1.265..v2.1.296).

Problem

With those fields a hook log could attribute each rule load to the subagent that caused it, which would let the repo measure the unmeasured row. The hooks page does not list the fields yet, so the claim rests on the changelog alone.

Evidence so far

Docs check on 2026-10-10: the hooks page (InstructionsLoaded input) lists no agent_id, agent_type or effort fields (docs lag the changelog). No probe has run (probed on Claude Code 2.1.296, 2026-10-10: not yet probed).

Open questions

  1. Do the fields appear in real InstructionsLoaded stdin for a load triggered by a subagent's Write or Edit?
  2. Does a path-scoped rule load at all on a subagent Write (versus Read only)?

Acceptance criteria

  • A recorded probe: a subagent Write and a subagent Edit into a path covered by a path-scoped rule, with a logging InstructionsLoaded hook; the log shows whether the rule loaded and which agent fields it carried.
  • The verified-mechanics row is updated with the measured result and the Claude Code version.

References

🤖 Generated with Claude Code

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 10, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    Understood: run one recorded probe, with a subagent doing a Write and then an Edit into paths covered by a path-scoped rule. A logging InstructionsLoaded hook records whether the rule loads and which agent fields it carries. Then update the verified-mechanics rows in the instruction-placement plugin with the measured result and the Claude Code version.

    The existing comments already settle the open questions: the docs do list the fields, and the probe is still needed. Nothing further is missing. Related: #6100.

    Automated triage, applied by the lanes App.

  3. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 12, 2026
  4. added theissue type on Oct 12, 2026
  5. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The owner approved going with independently verified recommendations on 2026-10-13. Two researchers worked this issue separately (code and history; upstream docs and owner intent), and a judge reconciled them.

    • Do the hooks docs already list agent_id/agent_type for InstructionsLoaded, and is the probe still needed? → The fields are documented: the InstructionsLoaded input section says it receives the common input fields, and the common fields include agent_id and agent_type when a hook fires inside a subagent. The 2.1.288 changelog also says it fixed InstructionsLoaded omitting agent_id and agent_type when a subagent's file access loads a rule or nested CLAUDE.md, and that such loads now report effort. So the triage premise that the docs omit them is wrong. What no source measures is whether a subagent's Write or Edit (not Read) loads a paths:-scoped rule or nested CLAUDE.md, and both verified-mechanics rows still say 'Write and Edit inside a subagent unmeasured'. The probe is still needed.
      Basis: https://code.claude.com/docs/en/hooks fetched this run: line 1393 ('In addition to the common input fields'), lines 743-748 (agent_id, agent_type); https://code.claude.com/docs/en/changelog fetched this run, line 783 (2.1.288 fix); origin/main plugins/instruction-placement/context/verified-mechanics.md:35-36
    • How should the probe run? → One headless run in a scratch project outside the checkout, with a logging InstructionsLoaded hook in a throwaway settings file. A subagent does a Write and then an Edit on a file covered by a paths: rule and on a file under a nested CLAUDE.md. Log load_reason, trigger_file_path, agent_id, agent_type and effort. Update rows 35-36 with the measured result and the Claude Code version. No edits to this repo's .claude/ settings or hooks.
      Basis: judgment; test(instruction-placement): measure subagent Write and Edit rule loads with InstructionsLoaded agent fields #6758 acceptance criteria (recorded probe plus row update with version); hooks docs: InstructionsLoaded exit code is ignored, so a logging hook cannot block

    Recommendation: Agent work: run the scratch-project probe and update the two verified-mechanics rows in one small draft PR in the instruction-placement plugin.

    Where sources disagreed, decided by: Rule 4 (current hooks page and 2.1.288 changelog) corrects the triage premise; rule 5 defaults otherwise. Both researchers agree.

    Admission to an agent lane stays with the work-class rules and owner ratification.

    This was generated by AI.

  6. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.

  7. added
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 13, 2026
  8. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  9. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    admission-deferredReady for the issue lane; work-unblock admits it when queued work is under the queued cap
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    admission-deferredReady for the issue lane; work-unblock admits it when queued work is under the queued cappriority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions