Skip to content

feat(claude): write plugin-namespace permissions and refresh CLAUDE.md block in update-plugin - #278

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
codex/update-plugin-permissions-rescue
Jul 4, 2026
Merged

feat(claude): write plugin-namespace permissions and refresh CLAUDE.md block in update-plugin#278
ScriptedAlchemy merged 2 commits into
masterfrom
codex/update-plugin-permissions-rescue

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Root-cause fix for plugin under-adoption: the installer never wrote permission allowlist entries for the plugin MCP namespace (mcp__plugin_tracedecay_tracedecay__*), so every plugin tool call prompted interactively and hard-failed headless/subagent contexts (evals: 4/4 sonnet sessions had every tracedecay call denied; 2/4 stalled answerless). update_plugin now writes/migrates the allowlist and refreshes the managed CLAUDE.md steering block.

Status: COMPLETE — all 16 checks green, ready for review

Progress log: originated in a Codex session (rescued from its working tree after the session ended) → round 1 CI exposed an idempotency fixed-point bug (twins derived only from pre-existing entries; fresh installs converged on the SECOND run) → fixed via union derivation → round 2 unmasked a pre-existing flake (register_marketplace stamps lastUpdated unconditionally; byte-stability depended on both install runs landing in the same second) → fixed by skipping the write when source+installLocation are unchanged → round 3 green.

What's left

Nothing in this PR. Downstream: feat/plugin-suite-improvements stacks on this branch and its duplicate T2 hunks fall away on rebase.

Recovery context

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2b7427d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@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: 1eb4995a56

ℹ️ 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 src/agents/claude.rs
for tool in tool_permissions
.iter()
.cloned()
.chain(plugin_tool_perms())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove plugin permissions on uninstall

After this starts adding mcp__plugin_tracedecay_tracedecay__* allow rules, ClaudeIntegration.uninstall() still removes only the legacy mcp__tracedecay__* prefix in uninstall_permissions. A user who installs or updates this version and then uninstalls TraceDecay keeps auto-approval entries for every TraceDecay plugin tool in ~/.claude/settings.json, so the integration is not fully removed from Claude config; include the plugin prefix in the uninstall filter as well.

Useful? React with 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the codex/update-plugin-permissions-rescue branch from 1eb4995 to ea6ed97 Compare July 4, 2026 06:44
Root-cause fix for plugin under-adoption: the installer never wrote
permission allowlist entries for the plugin MCP namespace
(mcp__plugin_tracedecay_tracedecay__*), so every plugin tool call
prompted interactively and hard-failed headless/subagent contexts.
update_plugin now writes and migrates the allowlist (idempotent: twins
derive from the union of existing and caller-supplied legacy entries)
and refreshes the managed CLAUDE.md steering block so updated steering
propagates to existing installs and their subagents.

Rescued from an ended Codex session's working tree, then fixed:
idempotency fixed-point bug and stale coercion-test expectations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ScriptedAlchemy

ScriptedAlchemy commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Full recovery manifest (all session + workflow ids)

Main orchestrating session: 2c51d204-3565-4a10-833d-d8fbd51620c3 (claude, /home/zack/projects/tracedecay) — tracedecay tool lcm_load_session --provider claude --session-id 2c51d204-3565-4a10-833d-d8fbd51620c3

Workflow runs (transcripts: session dir → subagents/workflows/<run_id>/):

Run Purpose Status
wf_785c5851-aee plugin-suite wave 1 (grep, telemetry, Claude surfaces, steering) completed; E/F/H died on session limit
wf_7f23bed7-803 triple-plugin completion (all 8 tasks + review + verify) wave 1 cached; resumed
wf_bcfa3aa1-ac9 / wf_2ede3e1d-75a / wf_d002080a-6e2 auto-sync D1–D7 (attempts 1/2/3) 3rd attempt active
wf_d0bf6fa4-48f 36-scenario eval corpus (sonnet+codex) done → fact 28
wf_d0ae2099-bfe obscure-tool evals + missed-opportunity hunt done → fact 33
wf_f46d3a1c-ccb session-git-correlation build (this feature) active

Research agents (task transcripts in the session's tasks/ dir): a24542ee4f08eee98 markdown audit→fact 24 · a143ce24edd3525f7 adoption research→fact 21 · a07f2677c93ebc313 rstest diagnosis→fact 23 · af4d3dac14e17f59c eval baseline+opus rerun→fact 25 · a3cfc66f0ca02f263 freshness design→fact 22 · ab49d9ae2d3a5f72d skill-pattern study (children af2210c6ae0c73588, af50cc51138da9bb2)→fact 29 · a546e5bb4d17b8ac6 hermetic harness

Durable decisions: facts 17–39 in this project's fact store (tracedecay tool fact_store --action search --query 'recovery manifest' → fact 39 has this table).

@ScriptedAlchemy
ScriptedAlchemy merged commit 2b10995 into master Jul 4, 2026
16 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the codex/update-plugin-permissions-rescue branch July 4, 2026 17:16
@ScriptedAlchemy
ScriptedAlchemy restored the codex/update-plugin-permissions-rescue branch July 4, 2026 21:54
@ScriptedAlchemy
ScriptedAlchemy deleted the codex/update-plugin-permissions-rescue branch July 4, 2026 21:58
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.

1 participant