Skip to content

fix: skills reading ${CLAUDE_EFFORT} inside a subagent may get the session effort #6908

Closed

Description

@kyle-sexton

Problem

A behavior-probes case on Claude Code 2.1.296 (plugins/harness-ops/skills/behavior-probes/cases/subagent/preloaded-skill-placeholder-reflects-session-effort, branch feat/agent-tool-spawn-effort) shows that ${CLAUDE_EFFORT} in a skill preloaded into a subagent expands to the session effort, not the subagent's own effort. In that case the agent was pinned low and the hook payload's effort.level read low, but the placeholder expanded to medium.

Skills that read ${CLAUDE_EFFORT} and can run inside a subagent may therefore report or act on the wrong level.

  • Preloaded case: discovery:research, preloaded into discovery:researcher (pinned high).
  • Loaded through the Skill tool inside a subagent (expansion there not probed): bugs:scan, codebase-health:audit, discovery/research/context/dispatch.md, harness-config:unhobble, mutation-testing:audit, planning/interview/context/session-config.md, plugin-quality:audit, verification:confirm.

Proposed next step

  1. Add a behavior-probes case for a skill loaded through the Skill tool inside a subagent, to see whether that path expands the session effort or the subagent's.
  2. Then decide per skill whether it needs the subagent's effort. If so, read it from the hook payload or another source.

plugins/discovery/reference/parent-contract.md is corrected in the effort-sweep PR.

Activity

  1. added
    needs-triage
    on Oct 11, 2026
  2. github-actions commented on Oct 11, 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: ${CLAUDE_EFFORT} in a skill preloaded into a subagent expands to the session effort. The open question is whether a skill loaded through the Skill tool inside a subagent does the same. The next step is a behavior-probes case for that path, run live and capped.

    Decision recorded. The owner approved applying independently verified recommendations (confirmed, low-risk set) on 2026-10-13.

    • Approve adding and live-running a behavior-probes case for ${CLAUDE_EFFORT} in a skill loaded through the Skill tool inside a subagent, before any per-skill change? → Yes: add the case and run it live, capped
      [quote truncated; the full decision is at the link]

    #6908 (comment)

    That decision settles the open questions. Adding the case and running it live need a host session, because the lanes App cannot push that path. That is already tracked by the host-run label.

    Automated triage, applied by the lanes App.

  3. removed
    needs-triage
    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 applying independently verified recommendations (confirmed, low-risk set) on 2026-10-13.

    • Approve adding and live-running a behavior-probes case for ${CLAUDE_EFFORT} in a skill loaded through the Skill tool inside a subagent, before any per-skill change? → Yes: add the case and run it live, capped
      Basis: plugins/harness-ops/skills/behavior-probes/records.md:280-291 (record 13, preloaded path only); behavior-probes/cases/subagent/ on origin/main (no Skill-tool case); plugins/harness-ops/skills/behavior-probes/SKILL.md:42 (live only on explicit ask)

    A probe showed ${CLAUDE_EFFORT} in a skill preloaded into a subagent expands to the session effort, not the subagent's pin; eight more skills load through the Skill tool inside subagents, a path nobody has probed. The preloaded case is recorded in records.md, but the Skill-tool case does not exist yet.

    Verification notes:

    • Assumption 'hook payload effort.level is a usable alternate source in the skills' cannot be verified yet; it bears only on the second round, not on the current question.

    Verified by an independent fresh-context check (confirmed, risk low): gh issue view 6908 (open; triage comment only); origin/main behavior-probes/records.md:280-291 record 13 (preloaded path only); cases/subagent/ on origin/main: six cases, all Agent-call based; none loads a skill through the Skill tool inside a subagent; SKILL.md:42 live only on explicit ask; discovery/reference/parent-contract.md:485-490 already states the session-level fact; code.claude.com/docs/en/skills ${CLAUDE_EFFORT} row: silent on subagent scope

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

  6. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

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

  7. changed the issue type fromtoon Oct 25, 2026
  8. added
    status: ready
    needs-owner-decision
    on Oct 25, 2026
  9. melodic-automation-lanes commented on Oct 25, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  10. removed
    status: ready
    on Oct 25, 2026
  11. melodic-automation-lanes commented on Oct 25, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  12. melodic-automation-lanes commented on Oct 25, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: Add a behavior-probes case under cases/subagent/ for ${CLAUDE_EFFORT} in a skill loaded through the Skill tool inside a subagent, run it live (capped), and record the result in records.md; per-skill changes are a later round.

    Acceptance criteria

    • A new directory plugins/harness-ops/skills/behavior-probes/cases/subagent/<name>/ exists with expect.json, prompt.md, settings.json and scaffold.sh, modeled on preloaded-skill-placeholder-reflects-session-effort.
    • The case's prompt makes a subagent pinned to a different effort than the session load a probe skill through the Skill tool, not by preloading it.
    • The probe skill echoes effort=${CLAUDE_EFFORT} in a Bash call, and expect.json targets that Bash call with in_subagent true and an input_match like the preloaded case.
    • expect.json sets claim, purpose, tags, permission_mode, max_turns and the expected outcome and match for the observed value.
    • The case was run live once under the cap, per the owner's decision, and the observed value (session or subagent effort) is written down.
    • plugins/harness-ops/skills/behavior-probes/records.md has a new record with claim, recheck trigger and a case/expected/observed/verdict row for the new case, following record 13's format.
    • The repo's behavior-probes validation or test for case structure passes with the new case.
    • No skill other than the new probe skill is changed, and parent-contract.md is untouched.

    Dependencies

    • The effort-sweep PR that corrects plugins/discovery/reference/parent-contract.md: it does not block the probe, but the per-skill follow-up should wait for it.
    • Per-skill decisions on the eight Skill-tool skills wait for this probe's result and are a separate later issue.

    Related work

    Sources read

    • plugins/harness-ops/skills/behavior-probes/records.md:280-291: record 13 covers only the preloaded path; observed effort=medium under a low pin, verdict pass
    • plugins/harness-ops/skills/behavior-probes/cases/subagent/preloaded-skill-placeholder-reflects-session-effort/expect.json:1-23: template with in_subagent Bash target and input_match for echo effort=
    • plugins/harness-ops/skills/behavior-probes/cases/subagent/preloaded-skill-placeholder-reflects-session-effort/scaffold.sh:3: delegates to the shared effort-probe.sh in PROBE_LIB
    • plugins/harness-ops/skills/behavior-probes/cases/subagent: six cases, none loads a skill through the Skill tool

    Automated refinement by the lanes App. Admission counts only criteria a listed human wrote: to confirm these, post them as your own comment whose first line is **Decision recorded.**, which sends the issue back through intake.

  13. 12 remaining items

  14. added
    needs-owner-decision
    and removed
    status: ready
    on Oct 25, 2026
  15. changed the issue type fromtoon Oct 26, 2026
  16. kyle-sexton commented on Oct 27, 2026

    @kyle-sexton
    MemberAuthor

    Re-triage. The owner restated on 2026-10-27 when an item stops for them:

    Signal me (a needs-human / needs-decision label, or a direct question) only for:

    1. A change to the original intent or vision.
    2. A finding during implementation (things don't always go to plan) that changes the intent, vision or primary design.
    3. A real HIGH/CRITICAL security or cost risk, as defined in section 3.

    Everything else moves through the factory floor on its own. [...] Any other stop is a defect to fix, not a reason to ask me.

    The design is already decided (#6908 (comment)): add a behavior-probes case for ${CLAUDE_EFFORT} in a skill loaded through the Skill tool inside a subagent, and run it live, capped. The lane's patch stopped on patch-protected-path because it changes a path the issue lane may not push (run 40232564060, #6908 (comment)). Neither is an owner question, so status: needs-decision has nothing open.

    Decided: a host session builds and pushes it, since the lanes App cannot push that path.

    Build: host session

    Host run (host-run label):

    • Apply the decided case, push it from a host session, and run it live, capped, as the 2026-10-13 decision says.

    Target labels: remove needs-human and status: needs-decision, add host-run.

  17. added
    host-run
    and removed
    needs-owner-decision
    needs-human
    on Oct 27, 2026
  18. added
    needs-triage
    and removed
    needs-triage
    on Oct 27, 2026
  19. added
    status: ready
    status: confirmed
    and removed
    status: ready
    on Oct 27, 2026
  20. kyle-sexton commented on Oct 28, 2026

    @kyle-sexton
    MemberAuthor

    Host run. This host ran the new subagent/skill-tool-skill-placeholder-effort behavior-probes case live, together with the preloaded control, on Claude Code 2.1.312, and opened its PR.

    What ran

    • An earlier session had already written the case, run it live on 2.1.310 (2026-10-25) and pushed branch feat/probe-skill-tool-effort-6908, but opened no PR. This run merged main into that branch, reran both cases on the current CLI, refreshed records 14 and 15, and opened the PR.
    • probe.py validate reported 42 cases, 0 problems. probe.py run --dry-run passed on both cases. probe.test.sh exited 0, and python3 -m unittest test_probe passed 56 tests.
    • The live run was probe.py run --live --max-runs 2 --max-cost-usd 4 --keep --case subagent/skill-tool-skill-placeholder-effort --case subagent/preloaded-skill-placeholder-reflects-session-effort on claude --version 2.1.312. It made 2 runs, both passed, with no retry.

    Result against the acceptance criteria

    • Case directory: done. It holds expect.json, prompt.md, settings.json and scaffold.sh, modeled on the preloaded case.
    • Skill tool, not preload: done. The subagent is pinned effort: low against a session at medium, and loads print-effort through the Skill tool. Its agent has no skills key, and the scaffold removes the preloading agents.
    • Bash target: done. expect.json matches the echo effort= call with in_subagent: true.
    • Live run and observed value: done. The subagent's Skill call returned Launching skill: print-effort, then it ran echo effort=low, its own pin, not the session's level. No literal ${CLAUDE_EFFORT} reached a command. The preloaded control on the same version still ran echo effort=medium, the session's level. The hook logged effort=low for both subagents.
    • records.md: done. Records 14 and 15 carry claim, recheck trigger and the result row, with the 2.1.312 refresh.
    • Validation passes: done.
    • Scope: only the new case and records.md changed. parent-contract.md is untouched.

    What this means for the issue: only the preloaded path reads the session level. The one skill on that path, discovery:research preloaded into discovery:researcher, is already covered in plugins/discovery/reference/parent-contract.md. The eight skills loaded through the Skill tool get the subagent's own level, so none needs a change.

    PR: #10626, opened as a draft and marked ready after the hold check and the verify gate passed (both AI review lanes run in CI). Not merged.

    Target labels: add none; remove host-run.

  21. removed
    host-run
    on Oct 28, 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

    status: confirmed

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions