Skip to content

harness-ops control-claude-code: isolate local drives and fix wait, mask and session-name gaps found in a live refresh #16524

Closed

Description

@kyle-sexton

A /app-control:map refresh of .claude/skills/control-claude-code-plugins ran 28 live drives
through /harness-ops:control-claude-code (PR #16518). These findings sit outside a refresh's edit
boundary, which covers only the control skill, so they are filed here.

Findings

  1. Local drives are not isolated from the checkout or the person's config. launch spawns
    the session holder with no cwd option, so claude --restricted starts in whatever directory
    the caller's shell is in (plugins/harness-ops/skills/control-claude-code/driver/driver.mjs,
    the spawn( near line 1005). The run uses the person's own config directory (the driving
    tool's Data: line). --restricted keeps file tools inside the working directories, so a
    driven skill can Write/Edit the caller's checkout. Observed: driven sessions read project
    memory under the config directory's projects/. A refresh worked around the cwd by moving
    the orchestrating session into the checkout under test. The isolated path is the broker's
    --in-sandbox (Let the pr-verify capture record a command-running skill's drive run #16383).
  2. stepMs (15 s) is shorter than most skill turns. Turns took 25 s to 64 s, and a
    naming:name-it-better fan-out took about 10 minutes, so most wait-for steps timed out.
    Each worker then made up its own longer wait.
  3. The Mask post-check cannot run after Cleanup. Its values: source (cli/account.mjs)
    needs a running session, and workers ran it after stop. It then failed closed, so no
    capture in about 25 runs was marked publishable. The order of the steps, or the source's
    dependency on a live session, needs to change.
  4. --session accepts at most 32 characters (exit 2). The driving tool's SKILL.md states no
    limit, and refresh-<module>-<skill> names went over it.
  5. wait-for matches anything on screen. That includes an earlier entry point's answer and
    tool-call lines (a file name). It is case-exact, and TUI tables use box characters, so a
    literal taken from print mode often never matches. The project control skill now carries a
    Gotcha for this. A "new text since " option would remove the stale-match class.

Done when

  • A local launch runs in a directory the driver chooses (or the person names), never the caller's
    shell directory, and the driving tool documents where it writes.
  • Wait timeouts fit observed skill turns, or the driving tool says how to raise them per step.
  • The mask post-check either runs before cleanup or gets its values without a live session.
  • The --session limit is stated where <session> is defined.

Refs: #16518

Activity

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

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the control-claude-code driver (driver.mjs), its defaults.json, SKILL.md and a changelog fragment in harness-ops; anyone who runs local drives through that skill.
    Reversible: yes; revert the change. Defaults return to the old cwd and stepMs.
    Open questions: none

    The recorded decision settles every open question, so nothing is asked again.

    Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's five questions, under the owner's answer to the batch question for issues with only implementation questions.

    Question as put to the owner (Q42, covering #15499, #16352, #16353, #16524, #16579 and #16748): six issues with only implementation questions.

    • A (recommended, chosen): an agent session posts a **Decision recorded.** comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.
    • B: the owner reviews each first.

    [quote truncated; the full decision is at the link]

    #16524 (comment)

    What I understood: local drives start in the caller's shell directory, stepMs is too short for real skill turns, the Mask post-check is ordered after stop, and the --session limit is undocumented. The decision's checklist covers these, plus finding 6 (plugin dependencies in a local drive). Finding 5 is out of scope.

    Automated triage. A maintainer reviews it.

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

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  5. melodic-automation-lanes commented on Nov 16, 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: The control-claude-code driver launches local sessions in a driver-chosen or caller-named directory, documents longer or per-step wait timeouts, fixes the Mask post-check ordering or its values source, and documents the 32-character --session limit.

    Related work

    Open questions

    1. Which directory should a local launch use: a fresh per-session temp directory by default, with an optional flag such as --cwd for the person to name one?
      RECOMMENDED: Default to a fresh per-session directory under the driver's runtime dir, plus an optional --cwd flag, and document both in SKILL.md. Basis: plugins/harness-ops/skills/control-claude-code/driver/driver.mjs:1005
    2. Should isolation also cover the person's config directory (separate CLAUDE_CONFIG_DIR), or only the working directory?
      RECOMMENDED: Cover only the working directory here, and document that config isolation is the broker's --in-sandbox path (#​16383). Otherwise a separate config dir would need its own login handling. Basis: judgment
    3. For the wait timeouts, should stepMs be raised, or should a per-step override be added (for example --timeout on wait-for)?
      RECOMMENDED: Add or document a per-step --timeout on wait-for, and raise the default stepMs moderately (for example 90000). Observed turns ran 25-64 s, but a 10-minute fan-out needs the override. Basis: plugins/harness-ops/skills/control-claude-code/config/defaults.json:9
    4. For the Mask post-check, should the steps be reordered so it runs before Cleanup, or should the account.mjs values source work without a live session?
      RECOMMENDED: Reorder SKILL.md so the post-check runs before stop. This is a docs-only change and keeps the source's live-session guarantee. Basis: plugins/harness-ops/skills/control-claude-code/SKILL.md:135
    5. Is finding 5 (a wait-for option matching only new text since a mark) in scope? It is in the body but not in Done when.
      RECOMMENDED: No. Leave it out of this issue and file it separately, since it is a new driver feature, not a fix for the four listed gaps. Basis: judgment

    Sources read

    • plugins/harness-ops/skills/control-claude-code/driver/driver.mjs:1005: the launch spawn of the holder passes no cwd option (detached, stdio, env only).
    • plugins/harness-ops/skills/control-claude-code/driver/driver.mjs:385: the SESSION name rule is 1-32 letters, digits, _ or -; the error text states it.
    • plugins/harness-ops/skills/control-claude-code/config/defaults.json:9: stepMs is 15000.
    • plugins/harness-ops/skills/control-claude-code/SKILL.md:17: defines <session> as one name for the run, with no length limit stated.
    • plugins/harness-ops/skills/control-claude-code/SKILL.md:20: timeouts come from config/local.json, else defaults.json; stepMs applies to every step.
    • plugins/harness-ops/skills/control-claude-code/SKILL.md:135: Cleanup runs stop; the Mask post-check order relative to it needs review.
    • plugins/harness-ops/skills/control-claude-code/driver/broker.mjs:10: the broker also enforces the 1-32 character session name.

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  6. kyle-sexton commented on Nov 16, 2026

    @kyle-sexton
    MemberAuthor
    1. A local drive loads none of the person's installed plugins. Ready's init event lists only the plugin under test and the four built-in cc-plugin-* plugins. So a plugin that declares a dependency (playgrounds on playground@claude-plugins-official) fails with dependency-unsatisfied and cannot be driven, even where the dependency is installed and enabled at user scope. Reproduced 2026-11-16 with Claude Code 2.1.325. Which launch flag causes it is UNVERIFIED. Done when: a drive can load a plugin's declared dependencies, or the driving tool documents that it cannot. The control-skill Gotcha is corrected in docs(control-skill): correct the playgrounds dependency Gotcha #16545.
  7. kyle-sexton commented on Nov 17, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's five questions, under the owner's answer to the batch question for issues with only implementation questions.

    Question as put to the owner (Q42, covering #15499, #16352, #16353, #16524, #16579 and #16748): six issues with only implementation questions.

    • A (recommended, chosen): an agent session posts a **Decision recorded.** comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.
    • B: the owner reviews each first.

    Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."

    The owner approved this agent session posting triage's answers as the checklist; he did not answer each implementation question himself. Triage flagged nothing (triage). The answers adopted are the RECOMMENDED lines of the refinement:

    1. A local launch defaults to a fresh per-session directory under the driver's runtime directory, with an optional --cwd flag to name one; SKILL.md documents both.
    2. Isolation here covers the working directory only; SKILL.md says config isolation is the broker's --in-sandbox path (Let the pr-verify capture record a command-running skill's drive run #16383).
    3. wait-for gets (or documents) a per-step --timeout, and the default stepMs is raised moderately (the refinement suggests 90000).
    4. SKILL.md is reordered so the Mask post-check runs before stop.
    5. Finding 5 (a wait-for option matching only new text) is out of scope here.

    Finding 6 (a local drive loads none of the person's plugins) came after the refinement; its own done-when is taken as written: a drive can load a plugin's declared dependencies, or the driving tool documents that it cannot.

    Acceptance criteria

    • plugins/harness-ops/skills/control-claude-code/driver/driver.mjs launch spawns the session holder with a cwd of a fresh per-session directory under the driver's runtime directory, or the directory --cwd names, never the caller's shell directory; a driver test covers both.
    • plugins/harness-ops/skills/control-claude-code/SKILL.md documents the default directory, --cwd, where a local drive writes, and that config isolation is the broker's --in-sandbox path.
    • wait-for takes a per-step --timeout (documented in SKILL.md), and stepMs in plugins/harness-ops/skills/control-claude-code/config/defaults.json is raised above 15000.
    • SKILL.md runs the Mask post-check before the Cleanup stop.
    • SKILL.md states the 1 to 32 character limit (letters, digits, _ or -) where <session> is defined.
    • A local drive loads a plugin's declared dependencies, or SKILL.md documents that a local drive cannot load them (finding 6).
    • The PR adds a changelog fragment for the harness-ops plugin.

    Posted by an agent session.

  8. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    A listed human released the issue's Work status hold, so it goes back to intake triage.

  9. 5 remaining items

  10. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor
  11. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, over 3 hours ago. work-unblock has re-fired it 2 time(s) on lane workflow files ce7c30088a6118f660286bc7ee448de3a1f130c6-33af19097ea5b8459ecc1ba6a88d1307516d7a2e and keeps re-firing it, waiting longer each time, up to 24 hours, until a run reports. This is a fault in the lanes, not in the issue; this comment is updated on each re-fire.

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

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, or it stopped or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

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

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44234539777, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share (limits.api github-token start-gate); that run ended at 2026-11-18T04:13:09Z. work-unblock has now removed and added agent-ready back to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or the kill-switch wait.

  14. github-actions commented on Nov 18, 2026

    @github-actions
    Contributor
    No description provided.
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

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions