Skip to content

docs(harness-ops): narrow the headless reload hedge for removed plugin MCP servers - #18167

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/17910-headless-reload-mcp-removal
Nov 22, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/17910-headless-reload-mcp-removal

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Closes #17910

Summary

scope-semantics.md hedged that a headless /reload-plugins never applies plugin MCP server changes in place. The 2.1.329 changelog fixed a removed plugin's MCP server staying connected in headless sessions after reload_plugins. A probe on 2.1.330 shows that fix applies to the Agent SDK's reload_plugins control request only: the typed command still leaves the server connected. The plugins CLI reference still says the headless reload "doesn't connect or disconnect plugin MCP servers" (read 2026-11-22), so the narrowed sentence rests on the probe.

Fix

  • plugins/harness-ops/skills/plugins/context/scope-semantics.md: the "Headless sessions can run it" paragraph narrows the hedge for removals through the reload_plugins control request, and keeps the hedge for the typed command, additions and changes. It names the probe as this pull request (issue harness-ops: scope-semantics.md headless reload hedge for removed plugin MCP servers after 2.1.329 (probe first) #17910) and keeps a recheck trigger for re-running the probe. It carries no as-of date and does not restate the typed command's reply, because the upstream-drift contract gives a behavior-only probe record no stamp.
  • .changes/harness-ops/: patch fragment.

Verification

Probe on Claude Code 2.1.330 (claude --version), WSL2. It used a scratch CLAUDE_CONFIG_DIR and cwd under .work/, with a local marketplace whose one plugin ships a stdio MCP server. A Node driver ran claude -p --input-format stream-json --output-format stream-json --verbose. In each run it sent mcp_status, ran claude plugin uninstall mcpprobe@probe-mcp-market -s user against the scratch config, reloaded, then sent mcp_status again and checked the server process with pgrep.

Reload path mcp_status before mcp_status after Server process after
reload_plugins control request plugin:mcpprobe:probesrv connected {"mcpServers":[]} exited
typed /reload-plugins user message connected still connected still running

The typed command's reply was Reloaded: 0 plugins · 0 skills · 5 agents · 0 hooks · 0 plugin LSP servers followed by Plugin MCP server changes take effect in your next session. The live ~/.claude was not touched: the probe marketplace name appears in none of ~/.claude/settings.json, ~/.claude.json or ~/.claude/plugins/{known_marketplaces,installed_plugins}.json.

markdownlint-cli2 and scripts/check-changelog-fragments.sh --check pass. No test file changed, so no test suite or selection trace applies.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01RAoAtV6H7kcRVG5xeX1rtT

…n MCP servers

A probe on Claude Code 2.1.330 (headless -p stream-json session, scratch
CLAUDE_CONFIG_DIR) showed that the Agent SDK's reload_plugins control
request disconnects a removed plugin's MCP server: it left mcp_status and
its process exited. The typed /reload-plugins in the same kind of session
left the server connected and replied "Plugin MCP server changes take
effect in your next session." scope-semantics.md now narrows the hedge for
removals through the control request only.

Closes #17910

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RAoAtV6H7kcRVG5xeX1rtT
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T15:46:11.497738Z 07e0fc2 PR opened
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07e0fc2e46

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2b628e3916c5f0ef730b2ba73112e2be3f07e426: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18167 (incremental, blocking only)

No security issues found.

This review covers only what changed since 07e0fc2e469a0a3a9622555336fc6eade087eef5. That is one file, plugins/harness-ops/skills/plugins/context/scope-semantics.md, and I read its whole change in the incremental diff. This lane already reviewed an earlier head, so only CRITICAL and IMPORTANT findings would be reported.

What changed. In the "Headless sessions can run it" paragraph, two wording edits:

The factual claim stays the same: the typed command leaves a removed plugin's server connected, and only the Agent SDK's reload_plugins control request disconnects it.

Instruction-surface check. The paragraph is reference prose about what the harness does. It is not a standing rule that blocks an action. The edit removes no guardrail, block list or allowlist, so no protected class is touched.

Other surfaces. The change does not touch:

  • plugin manifests, hooks, scripts or workflows
  • the trusted-actor list, tokens or kill switches
  • merge holds or other trust controls

The file is on no trusted path.

Earlier findings and PR text. This lane's only earlier post was a clean summary with no findings, so nothing carries over. The PR description contains no embedded instructions to the lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 07e0fc2e469a0a3a9622555336fc6eade087eef5; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 2b628e3916c5f0ef730b2ba73112e2be3f07e426: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #18167 (incremental, blocking only)

This lane already reviewed an earlier head (07e0fc2e), so this pass covers only the push since then and reports only blocking findings. That push changes one paragraph, in plugins/harness-ops/skills/plugins/context/scope-semantics.md (lines 344-347). I read the whole incremental diff and the surrounding paragraph at head.

Prior finding resolved. The earlier inline finding said the probe observation named no probe. This push fixes all three of its points:

  • The paragraph now names its probe: Probe: pull request #18167 (issue #17910). That gives a reader a place to check the evidence, which meets the closing issue's "citing that evidence" half and the probe-naming rule in .claude/rules/skill-bodies-state-current-rules.md.
  • It no longer paraphrases the typed command's output. It now says only that the typed command "left the server connected".
  • The As of 2026-11-22 stamp is gone. Since this is a record of behavior with no measured figure, the contract says it carries no stamp. The recheck trigger stays, as the reason to re-run the probe.

Closing issue #17910. The criterion reads: "lines 339-341 narrow the hedge for removals only, citing that evidence." It is now met. The hedge is narrowed only for removals made through the reload_plugins control request, and the probe is cited. The probe results are as the author reports them; I did not run the probe. This is prose about how the product behaves, so no repository test can check it.

The change touches no manifest, so there are no manifest lines. No changed line loosens a check. The prompt had no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line, so I used the defaults (verdict fail, no consumer entries) and did not check the citation requirement. Loosened checks would be marked: fail (default); patterns: 0.

Spend: none.

Embedded text: none found in the PR context.

This review covered only the push since 07e0fc2e and reported blocking findings only.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback

Run 45040325967, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 45040325967

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM66lR7E
Lane-Thread: PRRT_kwDOTCGFQM66lTv9
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-feedback-patch

Run 45040325967, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 2b628e3
Run 45040325967

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

pr-unblock / address-feedback finished round 1 of max 4 on 2b628e3.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback

Run 45040325967, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 45040325967

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-feedback-threads

Run 45040325967, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 45040325967

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 2f00acc Nov 22, 2026
71 checks passed
@kyle-sexton
kyle-sexton deleted the fix/17910-headless-reload-mcp-removal branch November 22, 2026 16:16
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

harness-ops: scope-semantics.md headless reload hedge for removed plugin MCP servers after 2.1.329 (probe first)

1 participant