Skip to content

fix(improvement): setup apply sometimes writes the team file before asking #17223

Closed

Description

@kyle-sexton

Summary

/improvement:setup apply sometimes writes the team file .claude/improvement.md before it asks the user anything. The skill's apply path is meant to draft values, ask each interview question with a recommendation, and write only after the answers.

Steps to reproduce

  1. Run the eval case p17048-se-apply-drafts (the setup-apply case registered for pull request refactor(improvement): cut the model-read ecosystem specifics #17048's eval; it is a copy of the improvement plugin's setup apply case with a prompt that names an exclusion and a telemetry source) against main's improvement plugin, several runs on Sonnet.
  2. Read each run's first tool calls.

Expected

Every run asks the first interview question, with a recommendation, before any Write to .claude/improvement.md.

Actual

Across three eval registrations on 2026-11-18, the run called Write on .claude/improvement.md before asking:

Text Runs that wrote first
main (merge base of #17048) 2 of 9
#17048's text before its rework 2 of 5
#17048's reworked text (one sentence added to apply step 2) 0 of 1

In the writing runs the session read config.md and hotspots.md, ran git probes, then wrote; one run's only text before the write announced the check. The eval's sandbox denied the write each time, so nothing was written there; in a real session the write would land.

Severity

Medium. The file is the team's own settings file and the write is a draft of values the user would be asked about, so the damage is a settings file written without consent, in about one run in four. No data is deleted.

What is not covered today

Done when

  • An eval case measures "asks before the first write" on the setup apply path and can report a failed run as a grader failure rather than voiding its batch.
  • On that case the apply path asks before writing in every run of a 5-run batch, on the text then on main.

Owner decision

Loosening the eval validity gate for the first Done-when item is accepted by the owner (D402): a denied call that a failed max-0 tool_used grader forbids becomes a grader failure and a warning, not a batch void. Record: https://github.com/melodic-software/architecture/blob/f2c8ed71bbd5494bb63de719bf28761a3e43e4b4/docs/owner-decisions.md?plain=1#L220. Owner, verbatim: "Go with recommendations."

Suggested fix location

plugins/improvement/skills/setup/SKILL.md, the apply section's opening ("Proceed non-interactively where ... unambiguous") and step 2; the eval kit's handling of a denied graded tool.

Refs: #16777

Activity

  1. added
    needs-triage
    on Nov 18, 2026
  2. github-actions commented on Nov 18, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none
    Blast radius: the improvement plugin's setup skill text, one eval case, and the eval kit's handling of a denied graded tool; read by plugin users running setup apply and by eval maintainers.
    Reversible: yes; revert the skill text, eval case and eval-kit changes.
    Open questions: none
    I understood this as a defect: /improvement:setup apply sometimes writes .claude/improvement.md before asking its first interview question (about 1 run in 4 in your eval registrations). It also reports that no eval measures this now. Done-when is two parts: an eval case that grades "asks before the first write" and reports a failure as a grader failure instead of voiding the batch, then a 5-run batch where the apply path asks first, on the fixed text and on main. The eval-kit change that stops a denied graded call from voiding a batch is ordinary work. The owner decision cited in the body is not a **Decision recorded.** comment, so I did not rely on it. The scope is exact without it. I found no open duplicate and no merged pull request in the recent list that already fixes this. #17048 and #17252 are related and are named in the issue.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 18, 2026
  4. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"49957ff63f9a7ee0167946d8058ea50b1a4572bae10e8469d1e6f41eac759f6a","body_sha256":"693c55aeb4aea33ae7dca32285d05b6989e140be26a1356b6e24aeeec10896ed"}

  5. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"49957ff63f9a7ee0167946d8058ea50b1a4572bae10e8469d1e6f41eac759f6a","body_sha256":"693c55aeb4aea33ae7dca32285d05b6989e140be26a1356b6e24aeeec10896ed"}

  6. github-actions commented on Nov 18, 2026

    @github-actions
    Contributor
    No description provided.
  7. melodic-automation-lanes commented on Nov 19, 2026

    @melodic-automation-lanes
    Contributor

    Pull request #17252 merged with Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removed status: ready and agent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it at status: confirmed for a check of what that pull request left, until a **Decision recorded.** comment says what is left or someone closes it.

  8. github-actions commented on Nov 19, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  9. melodic-automation-lanes commented on Nov 19, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: merged pull request #17252 names it with Refs: after its newest decision or refinement comment, so its work may already be done: close the issue if it is, or post a comment whose first line is **Decision recorded.** saying what is left, which sends it back through intake. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  10. kyle-sexton commented on Nov 19, 2026

    @kyle-sexton
    MemberAuthor

    Done-when 2 is met on main, so this closes. #17252 merged on 2026-11-19 at 10:01 UTC (merge commit a373bb2).

    The 5-run batch on main (case setup-apply-drafts-then-asks, sonnet, Claude Code 2.1.328, pass rule fixed before launch: no-write, no-edit and asks-with-recommendation each 5 of 5, no rerun):

    Grader Before the fix (9735ba6) main (a373bb2)
    no-write 5/5 5/5
    no-edit 5/5 5/5
    asks-with-recommendation 5/5 5/5
    baseline-before-question 5/5 5/5
    drafts-generated-exclusion 5/5 4/5
    drafts-telemetry-candidate 5/5 5/5
    no-undeclared-source 5/5 5/5

    Both batches read VALID with no denied call. Spend 1.34 USD including the smoke runs.

    What this does not show:

    • The text before the fix also passed 5 of 5 in this batch, so these runs do not show that the fix changed the behaviour; they show only that main asks before writing in 5 of 5 runs. At a 10% write-first rate, 5 clean runs out of 5 still happen about 59% of the time.
    • No run wrote before asking, so the validity gate's new set-aside (a denied forbidden call counted as a grader failure, not a void batch) was not exercised here. Done-when 1 rests on fix(improvement): ask before setup apply writes the team file #17252's tests and its own eval record.
    • drafts-generated-exclusion passed 4 of 5 on main against 5 of 5 before; one run is under the 2-run loss line.
    • Nothing here tests that the team file is written correctly after the answers, or behaviour on another model.
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

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions