Skip to content

feat(app-control): attended --attach for drive - #9283

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/9193-drive-attach
Oct 23, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/9193-drive-attach

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #9193

Summary

/app-control:drive gains an attended-only --attach, so attaching to a process already running has a home before #9183 removes /debugging:analyze-profile's capture mode (owner decision Q671: this first, then #9183).

Fix

  • SKILL.md: an --attach row in Actions and a new ## Attach section. Attach runs only with a person present to approve; with no one present (--unattended, a scheduled run, a loop, CI, a dispatched brief, a headless run) it refuses with blocked: --attach needs a person present. Each attach shows the exact command and process and waits for a yes, and offers launching the app instead when that works. Elevation goes through a script written to a new temporary directory, shown in full and run only after a yes. Cleanup detaches from an attached process and never stops it.
  • evals/evals.json: four consent cases (ids 5-8) ported from analyze-profile's ids 4-6: ask before attaching, refuse when no one is present, refuse under --unattended, elevation through a shown script.
  • README.md: drive's row names --attach.
  • Changelog fragment (minor).

--attach is a bare flag (the person names the process when asked): the argument hint's 100-character limit leaves no room for a value. No script is committed under plugins/**/scripts/**.

Verification

  • plugins/skill-quality/scripts/check-skill.sh plugins/app-control/skills: exit 0 (PASS, 3 warnings, one the body growth 84 -> 105 lines).
  • plugins/skill-quality/scripts/check-evals-quality.sh on drive's evals: exit 0, no warnings; check-jsonschema against the evals schema: exit 0.
  • scripts/check-affected.sh: exit 0 (11 passed, 2 skipped).

Related

#9183 (blocked by this), #7581, #7555

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 22, 2026 22:47
drive gains an attended-only --attach: it asks before each attach to a
running process the person names, refuses under --unattended or with no
person present and records the step as blocked, and runs an elevated
attach only through a script it shows first. Four eval cases cover the
consent rules.

Refs: #9193

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 23, 2026 02:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T02:52:07.751108Z d3887f4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d3887f473f4c1e6f7043faa27331cc777d1bf137: 0 finding(s), 0 as inline comments.

Security review: PR 9283 (head d3887f4)

Result: no security findings; no inline comments posted.

The PR adds an attended-only --attach action to /app-control:drive. It changes only skill prose, the README, a changelog fragment and eval data. It touches no executable code, hooks, workflows or plugin manifests, so there are no manifest <field> lines.

Instruction-surface lens. The diff adds a capability and does not delete or soften a guardrail. I could not read the instruction exception register (docs/conventions/instruction-exception-register/README.md), so I judged by consequence rather than the protected-class list.

  • The unattended limits are intact: never attach to a process the run did not start, and capture only on a process the run launched. The --unattended row still says "attach to nothing", and the "app already running" gotcha still records blocked.
  • The new Attach section requires a person present, a confirmation for each attach with one yes covering one attach, and refusal with a recorded blocked line when no one is present. That refusal covers --unattended, scheduled runs, loops, CI, dispatched briefs and headless runs.
  • Elevated attaches go through a script that is shown in full before it runs.
  • The cleanup change, "Detach from an attached process; never stop it", narrows what cleanup may do.
  • The four new eval cases cover ask-before-attach, refusal with no one present, refusal under --unattended, and elevation through a shown script.

Considered and not reported.

  • The person-present check relies on the model's judgment, as the existing unattended limits do. The diff gives no concrete path to bypass it.
  • Between showing the elevation script and running it, another local user could in principle swap the file. The skill puts it in a "new temporary directory", which would normally be mktemp -d at mode 0700. There is no concrete exploit path in the diff.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed d3887f473f4c1e6f7043faa27331cc777d1bf137: 0 finding(s), 0 as inline comments.

Code review: PR #9283 (feat(app-control): attended --attach for drive)

No findings.

I read the full diff, the PR context and the touched SKILL.md. I did not run any commands, so the PR's verification claims (check-skill.sh, check-evals-quality.sh, check-affected.sh) are author-claimed and unverified by me.

Closing issue #9193.

  • --attach documented as attended-only: met. It is in the Actions table, the new ## Attach section and the argument hint, and the README row names it.
  • Unattended --attach refused: met. ## Attach records blocked: --attach needs a person present, and eval id 8 tests it.
  • Consent evals ported: met. The issue says three, and the PR adds four (ids 5-8): ask before attaching, refuse with no one present, refuse under --unattended, and elevation through a shown script.
  • "Behind a script the person sees": the PR requires a shown script only for elevated attaches. Other attaches show the exact command and wait for a yes. That matches the consent model of the analyze-profile cases it ports, so I did not flag it.

Path-scoped rules.

  • skill-bodies-state-current-rules.md: the new text states only the skill's own decisions. It restates no volatile upstream behaviour, and ## Next is intact.
  • cost-claims.md and eval-case-transcripts.md: nothing in the diff triggers either. The eval prompts are synthetic, with no raw transcripts or prices.

Changelog. bump: minor fits a new flag and new evals.

Not flagged. Two minor points, neither enough to block:

  • No tool for drive steps: ## Attach names only the control skill's ## Capture tool, while the Actions row also says "drive … against a process already running". The text does not say how an attached drive step runs.
  • Cleanup row not updated: the cleanup row in the Actions table does not mention detaching or deleting the elevation script. The Rules and Attach sections do state both.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit b4e0ee1 Oct 23, 2026
70 of 71 checks passed
@kyle-sexton
kyle-sexton deleted the feat/9193-drive-attach branch October 23, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(app-control): add attended --attach to /app-control:drive with consent evals

1 participant