Skip to content

docs(cloud): record the same-session plugin load limit and add the paste-once rollout kit - #2677

Merged
kyle-sexton merged 6 commits into
mainfrom
claude/config-audit-dda110
Aug 15, 2026
Merged

docs(cloud): record the same-session plugin load limit and add the paste-once rollout kit#2677
kyle-sexton merged 6 commits into
mainfrom
claude/config-audit-dda110

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

No linked issue

Summary

Cloud sessions could never use this repo's plugins on turn one: the SessionStart hook installs the full catalog, but Claude Code builds its plugin/command registry at process start — before hook effects land — and never re-reads it. This PR records that finding with its evidence and fix, and adds the copy-paste rollout kit for moving the whole fleet (and every account environment) onto the layout that works.

Fix

  • docs/CLOUD-SESSIONS.md: document the same-session limit observed 2026-08-15 (hook completed 65 enabled, 65 newly installed, 0 failed with the on-disk registry fully populated, yet the same session resolved no plugin command or skill), plus the confirmation that a stop/resume restarts the process and loads everything; reframe the environment setup-script one-liner from a performance lever to the required pre-launch slot for plugin liveness.
  • .claude/hooks/session-start.sh: state the timing limit in the header — hook-time installs serve the next process start, so the environment setup script must run this bootstrap at cache build for a session to start with plugins loaded.
  • docs/CLOUD-FLEET-SETUP.md: refresh the stale "bootstrap is currently unwired" finding (settings.json registers the hook on main and it ran), fix the verification step that relied on /plugin (unavailable in cloud sessions), and point step 1 at the rollout kit.
  • prompts/cloud-bootstrap-rollout.md (new): the paste-once account environment stub, the prompt for creating the shared cloud/env-setup.sh in melodic-software/standards, and the per-repo migration prompt that renames .claude/hooks/session-start.sh to .claude/cloud-bootstrap.sh — one script, two callers (environment setup script pre-launch; SessionStart hook for per-session drift repair) — and settles on one Default environment per account.

Verification

  • markdownlint-cli2, typos, and editorconfig-checker pass on all touched files; shellcheck and shfmt -d pass on the hook (comment-only change).
  • Empirical basis verified live in the cloud session that produced this PR: installed-on-disk vs empty session registry, a failed mid-session skill probe, and full catalog loading after resume (this repo's own commit-convention hook began enforcing mid-session once loaded).
  • Official-docs basis: hooks reference documents no same-session pickup; /plugin and --plugin-dir are unavailable in cloud sessions; the setup script runs after clone and before the session process.

Related

docs/CLOUD-SESSIONS.md §"Plugins in sessions on this repo", docs/CLOUD-FLEET-SETUP.md, docs/MIGRATION-PLAYBOOK.md (same-version commit drift), #2061, #2539, #2657

🤖 Generated with Claude Code

https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd


Generated by Claude Code

claude added 2 commits August 15, 2026 04:21
A 2026-08-15 cloud session on this repo showed the SessionStart hook
completing all 65 plugin installs (registry, user-scope settings, and
marketplace all correct on disk) while the session itself still resolved
no plugin command or skill: the plugin/command registry is built at
process start, before hook effects land, and is never re-read. Neither
/plugin nor --plugin-dir exists in cloud sessions to force a reload, so
on an ephemeral VM the hook alone can never yield a session with plugins
loaded.

Record the observation and its consequence in CLOUD-SESSIONS.md, reframe
the environment setup-script one-liner from a performance lever to the
required pre-launch slot for plugin liveness, state the timing limit in
the hook's own header, refresh CLOUD-FLEET-SETUP.md's stale "bootstrap
is unwired" finding (settings.json now registers the hook), and fix the
verification step that relied on /plugin being available in cloud
sessions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd
Confirmed on resume that a process restart re-reads the plugin registry
(the full catalog loaded after stop/resume), and record that in
CLOUD-SESSIONS.md. Add prompts/cloud-bootstrap-rollout.md: the account
environment stub (paste once per claude.ai account, fetches the shared
setup from the public standards repo), a prompt for creating that shared
script in melodic-software/standards, and the per-repo migration prompt
that renames .claude/hooks/session-start.sh to .claude/cloud-bootstrap.sh
so one script serves both callers with honest semantics — the environment
setup script pre-launch (what makes plugins live at turn one) and the
SessionStart hook for per-session drift repair. Point CLOUD-FLEET-SETUP
step 1 at the kit and settle the one-environment-per-account question.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd
@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@kyle-sexton
kyle-sexton enabled auto-merge (squash) August 15, 2026 05:30

@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: b7fc6b1bb6

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

Comment thread docs/CLOUD-FLEET-SETUP.md Outdated
Comment thread prompts/cloud-bootstrap-rollout.md
Comment thread prompts/cloud-bootstrap-rollout.md Outdated
claude added 2 commits August 15, 2026 05:33
…da110

# Conflicts:
#	docs/CLOUD-FLEET-SETUP.md
Main landed #2668 while this branch was open: the fleet guide now points
account stubs at the existing standards cloud-environment component
(components/cloud-environment/setup.sh), which already runs the
checked-out repo's bootstrap at cache build, and records that Custom
network access is a hard requirement for the .NET install (#2654).
Rework the rollout kit to adopt that canon instead of inventing a
parallel cloud/env-setup.sh: the account part now pastes the canonical
stub with the Custom allowlist, the standards part updates the existing
component to prefer .claude/cloud-bootstrap.sh with a session-start.sh
fallback, and the ordering puts standards before account cache rebuilds
since publishing a component change does not invalidate built caches.
Also fold in review findings: migrating repos must re-derive
path-relative repo-root fallbacks for the new .claude/ depth, and the
component should pass CLAUDE_PROJECT_DIR so repo scripts never guess.
Update the fleet guide's rollout note and the cloud-sessions pointer to
match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd
@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 15s —— View job


Code review (/review:code-review)

  • Gather context (PR diff vs origin/main, .claude-pr/CLAUDE.md, REVIEW.md)
  • Review changed files for correctness/maintainability
  • Post findings

Scope: docs-only PR (.claude/hooks/session-start.sh comment-only change, docs/CLOUD-FLEET-SETUP.md, docs/CLOUD-SESSIONS.md, new prompts/cloud-bootstrap-rollout.md). REVIEW.md's security-lane split doesn't apply here — nothing security-relevant changed. No code to build/lint/test; the PR body's markdownlint-cli2/typos/editorconfig-checker/shellcheck/shfmt results are author-claimed and unverified by me.

Codex's three earlier findings on this PR (fleet-audit contradiction, path-relative root breakage on the .claude/hooks/.claude/ move, publish-before-rebuild ordering) all appear already resolved by the latest commit (5421a84, "fix(docs): align the rollout kit with the canonical standards component") — I independently checked each:

  • The fleet-audit table row for this repo (docs/CLOUD-FLEET-SETUP.md line 41) already reads "registered," matching the Findings section — no contradiction at HEAD.
  • prompts/cloud-bootstrap-rollout.md's Part 1 (component) and Part 3 (per-repo migration) now explicitly handle the BASH_SOURCE-relative depth change and have the component pass CLAUDE_PROJECT_DIR explicitly.
  • The rollout kit now points accounts at the standards repo's already-existing canonical component (not a not-yet-created file), and states the Part 1-before-Part 2 ordering rationale.

One new finding, posted inline:

  • docs/CLOUD-FLEET-SETUP.md:72prompts/cloud-bootstrap-rollout.md's "One environment per account?" section says it "supersedes" this file's "add a new environment named e.g. Melodic" option, but that exact line is left unchanged four lines below the PR's new blockquote pointing at the rollout kit — so this file now contradicts itself for a reader who doesn't separately open the rollout kit's closing section. Suggested fix included inline.

Branch: claude/config-audit-dda110

@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 19s —— View job


Security review (/review:security-review)

Task list

  • Gather context (PR diff, review comments, custom instructions)
  • Run /review:security-review
  • Post findings

Result: no security findings.

This PR is documentation-only:

  • .claude/hooks/session-start.sh — comment-only change (no executable logic touched).
  • docs/CLOUD-SESSIONS.md, docs/CLOUD-FLEET-SETUP.md — prose updates recording the same-session plugin-load limit and refreshing a stale fleet-audit note.
  • prompts/cloud-bootstrap-rollout.md (new) — a copy-paste rollout kit (account setup-script stub, standards-repo prompt, per-repo migration prompt).

I checked the new prompt file's curl -fsSL … -o /tmp/... && bash /tmp/... stub specifically, since download-then-execute is a common supply-chain pattern. It's not a new finding here: it's an exact copy of the stub already committed on main in docs/CLOUD-FLEET-SETUP.md (verified via git show origin/main:docs/CLOUD-FLEET-SETUP.md), so it's pre-existing, out of scope for this review, and unchanged in risk by this PR.

No injection surfaces, credential/token handling, permission changes, or GitHub Actions workflow edits are introduced. Per the skip gate (change has no security-relevant surface), no further review is needed.

Note: two chatgpt-codex-connector review comments on this PR (fleet-audit/finding contradiction, and the hook's path-relative root-resolution note in prompts/cloud-bootstrap-rollout.md:123) are correctness/documentation-consistency concerns, not security vulnerabilities, so they're out of scope for this security lane — flagging for visibility only, not acting on them here.

@github-actions

Copy link
Copy Markdown

Last security-reviewed head: 5421a84a11ff928e02b359f944b97ed07b35a404. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

Comment thread docs/CLOUD-FLEET-SETUP.md Outdated
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude has reviewed this PR 3 times. The lane skips further automatic reviews after 5; deleting this comment resets the count.

The rollout kit's one-Default-per-account decision supersedes the "add a
new environment named e.g. Melodic" option, but the sentence presenting
that option survived four lines below the blockquote pointing at the
kit, leaving the fleet guide contradicting itself for a top-to-bottom
reader. State the settled choice and link the kit's rationale section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd
@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 56s —— View job


Code review (/review:code-review)

  • Gather context (PR diff vs origin/main, prior review comments, latest commit)
  • Review latest commit (ec7ea04) for correctness/maintainability
  • Check for any new findings introduced
  • Post findings

Scope: docs-only PR, unchanged from the prior review's scope assessment (.claude/hooks/session-start.sh comment-only, docs/CLOUD-FLEET-SETUP.md, docs/CLOUD-SESSIONS.md, new prompts/cloud-bootstrap-rollout.md). Diff vs origin/main at this head (235/-15 across the 4 files) matches the PR's declared totals, confirming nothing else changed since the last review.

The one finding from the previous review round is resolved. Commit ec7ea04 ("docs(cloud): drop the superseded named-environment alternative") replaces docs/CLOUD-FLEET-SETUP.md:71-72's "Either edit Default in place or add a new environment named e.g. Melodic" with "Edit Default in place" plus a link to the rollout kit's One environment per account? section — I checked the link resolves (heading exists at that line, slug matches, relative path ../prompts/... is correct from docs/). The fleet guide no longer contradicts the rollout kit's stated decision.

Codex's three earlier findings (fleet-audit contradiction, path-relative root resolution on the hook move, publish-before-rebuild ordering) remain resolved as of 5421a84, per the prior review round — nothing in ec7ea04 touches those areas.

No new findings. This one-file, three-line commit is a clean, self-contained fix with no side effects elsewhere in the diff.
· Branch: claude/config-audit-dda110

…lback

Decision: the standards cloud-environment component runs a repo's
.claude/cloud-bootstrap.sh and nothing else — no session-start.sh
fallback branch. A repo without the file is a clean no-op whose sessions
rely on their SessionStart hook until the repo migrates, which makes
completing the migration the switch that turns on pre-launch bootstrap
(and turn-one plugins) per repo. Update the rollout kit's standards and
migration prompts and the fleet-guide rollout note to state that
contract instead of the fallback they previously prescribed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NhKrvZ4Jz1qK2wWDWXiZd
@claude

claude Bot commented Aug 15, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 45s —— View job


Code review (/review:code-review)

  • Gather context (PR diff vs origin/main, custom instructions)
  • Review changed files for correctness/maintainability
  • Post findings

Scope: docs-only PR (.claude/hooks/session-start.sh comment-only, docs/CLOUD-FLEET-SETUP.md, docs/CLOUD-SESSIONS.md, new prompts/cloud-bootstrap-rollout.md). No code to build/lint/test; the PR body's markdownlint-cli2/typos/editorconfig-checker/shellcheck/shfmt results are author-claimed and unverified by me here.

Prior findings all confirmed resolved at HEAD (ec260e6) — checked independently, not taken on faith:

  • Codex's fleet-audit-vs-findings contradiction: docs/CLOUD-FLEET-SETUP.md's audit row (line 41) and its Findings section now agree ("registered").
  • Codex's path-relative-root note (prompts/cloud-bootstrap-rollout.md): Part 1 now passes CLAUDE_PROJECT_DIR explicitly, and Part 3 step 2 now has the migrated script derive its root relative to the new .claude/ depth instead of the old .claude/hooks/ depth.
  • Codex's publish-before-rebuild ordering: the kit's "Ordering" paragraph now states Part 1 must land before Part 2, with the reason (publishing doesn't invalidate already-built caches).
  • The earlier Claude review's "Melodic" self-contradiction (docs/CLOUD-FLEET-SETUP.md line ~70): fixed in ec7ea04 — the line now reads "Edit Default in place," matching the rollout kit's "one Default per account" conclusion instead of contradicting it.

One new finding, posted inline on prompts/cloud-bootstrap-rollout.md:51-57:

Part 1 has the standards cloud-environment component drop its session-start.sh invocation entirely — "only [.claude/cloud-bootstrap.sh], no session-start.sh fallback — by decision" — the moment it's updated, before any repo does its own Part 3 rename. But docs/CLOUD-FLEET-SETUP.md's Findings section (line 300, untouched by this PR) states in the present tense that plugins go live at turn one for this repo today precisely because "the standards cloud-environment component" bootstraps its (still .claude/hooks/session-start.sh-named) hook pre-launch. So running Part 1 + Part 2 without immediately following with this repo's own Part 3 regresses this exact repo back to the turn-one-empty-registry bug the PR spends two docs documenting and fixing — and the same applies to any other fleet repo with a working hook today. The kit sequences Part 1 before Part 2 but doesn't sequence or even flag the Part 3 dependency, so a reader following the numbered order as written can walk straight into the bug this PR fixes. Suggested fix inline: keep a temporary session-start.sh fallback in the component until the fleet finishes migrating, or make each already-working repo's Part 3 an explicit same-sitting step alongside Part 1/2.
· Branch: claude/config-audit-dda110

@kyle-sexton
kyle-sexton merged commit 84f983b into main Aug 15, 2026
40 checks passed
@kyle-sexton
kyle-sexton deleted the claude/config-audit-dda110 branch August 15, 2026 05:49
Comment on lines +51 to +57
1. Where the component runs the checked-out repo's bootstrap, invoke
.claude/cloud-bootstrap.sh when present — and only that path, no
session-start.sh fallback — best-effort (|| true) with
CLAUDE_CODE_REMOTE=true and with CLAUDE_PROJECT_DIR set to the checkout
root, so repo scripts never have to guess their root from their own path.
A repo without the file is a clean no-op: it simply has not migrated yet,
and its sessions rely on their SessionStart hook until it does.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correctness: Part 1, done before every repo's Part 3, regresses turn-one plugin loading fleet-wide — including this repo, today.

Per docs/CLOUD-FLEET-SETUP.md's Findings section (line 300, unchanged by this PR): "plugins go live at turn one only when the cache build runs the bootstrap pre-launch, which the standards cloud-environment component does" — present tense, confirming the component currently invokes this repo's .claude/hooks/session-start.sh pre-launch, and that this is why this repo's sessions get plugins at turn one today.

Once Part 1 lands (component invokes .claude/cloud-bootstrap.sh only, "no session-start.sh fallback — by decision") and Part 2 rebuilds an account's cache, every repo that hasn't yet completed its own Part 3 rename — including this repo, since this PR doesn't rename its own hook — silently loses pre-launch execution. Line 57's "its sessions rely on their SessionStart hook until it does [migrate]" undersells this: the whole point of this PR is that the per-session hook alone can never produce a session with plugins loaded (per docs/CLOUD-SESSIONS.md §"Plugins in sessions on this repo"). So the transition from Part 1/2 to a given repo's Part 3 isn't neutral — it's a regression back to the exact turn-one-empty-registry bug this PR documents and fixes, for every not-yet-migrated repo.

The "Ordering" note above only sequences Part 1 before Part 2; nothing sequences Part 3 (or at least this repo's Part 3) tightly after Part 1/2 to bound the regression window, and nothing flags that the window exists. Worth either: (a) keeping a session-start.sh fallback in the component until the fleet finishes migrating, then removing it in a follow-up, or (b) making Part 3 for this repo (and any other already-working repo) a mandatory same-sitting step immediately after Part 1/2, called out explicitly in the kit.

Fix this →

kyle-sexton pushed a commit that referenced this pull request Aug 15, 2026
Resolves docs/CLOUD-SESSIONS.md conflicts with #2677 by keeping main's
evidence-backed same-session plugin-limit text and aligning its naming
with the bootstrap rename; drops this branch's now-redundant summary
sentence from the script's plugin comment in favor of main's Timing
limit block, reworded for the two-caller layout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiC1awyDKZMW2u1Dks1Tqh
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.

2 participants