Repository navigation
refactor(server): one J5 tool pre-approval list for Codex and Claude - #301
Merged
Merged
Conversation
Codex and Claude each kept their own copy of the J5 tools they pre-approve. Move the list, the interactive-mode coordination subset, and the approval-policy-never check into j5ToolPreapproval.ts so every adapter append spreads the same set. Codex and Claude produce the same config as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: Jacksondr5/j5code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Comment |
bryantderosier
added this pull request to stack #305
September 25, 2026 00:11
bryantderosier
requested review from
BastiHu,
Jacksondr5 and
tyler-barton-horizon
September 25, 2026 00:13
This was referenced Sep 25, 2026
Conflicts in FORK.md (the Crews paragraph and the upstream-hook table) and crews.md History: took the sync's text and reapplied this branch's shared j5ToolPreapproval module wording. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Jacksondr5
reviewed
Sep 26, 2026
Jacksondr5
reviewed
Sep 26, 2026
Owner
|
Decision (Jackson, 2026-09-26): keep #301; the rest of the Captains stack is closed. See the ruling on #233. #301 is J5-owned and adds no upstream surface, so it stays. Before it merges:
|
This was referenced Sep 26, 2026
…uman step Per Jackson's ruling on #233, J5 pre-approves its tools on Codex and Claude only. crews.md AC5, the "Any harness can captain" bullet, its History line, and the Crews section of the personas guide now say that other harnesses may ask once with their own MCP prompt before the roster card, and a read-only persona there can't propose. The never-pre-approved testkit list is scoped to J5's own appends and names Claude's upstream mcp__t3-code__* wildcard as the exception. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
@Jacksondr5 Your pre-merge list for #301 is done:
I also merged the latest |
Jacksondr5
reviewed
Sep 28, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bryantderosier
added a commit
that referenced
this pull request
Sep 29, 2026
Conflicts: AC3 keeps #347's approval flag and adds this branch's preview-binding sentence; the personas guide keeps #301's and #347's text and adds the preview and ACP sentences, now in #344's access-mode names (Supervised, Auto-accept edits); both 2026-09-24 History lines stay. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bryantderosier
added a commit
that referenced
this pull request
Sep 29, 2026
Conflicts: agent-tools.md takes main's quoted propose_crew and request_crew_member descriptions and tables, which match the shipped strings after #347; crews.md takes main's Definition (Full access default, seats ask their Captain) with this branch's no-approver roster wording, and History keeps one date-ordered list with #301's and #307's 2026-09-24 lines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Jackson's ruling on #233 (2026-09-26): every shipped adapter can be a Captain, and J5 pre-approves its own tools on Codex and Claude only, where the roster card is the only human step before a Crew launches. Other harnesses may show their own MCP prompt once before the roster card. Before this PR, Codex and Claude each carried their own copy of the J5 tool list; this PR gives them one shared list.
What I changed
apps/server/src/j5/a2a/mcp/j5ToolPreapproval.ts(new):J5_PREAPPROVED_TOOLS(the full J5 set, used where the thread never asks for approval),J5_COORDINATION_TOOLS(used in interactive modes),j5ApprovalPolicyIsNever,j5PreapprovedTools(policy), andj5T3McpToolName.codexToolApproval.tsandclaudeAllowedTools.tsnow derive their lists from the shared module instead of keeping their own.j5ToolPreapproval.testkit.ts(new):J5_APPROVAL_POLICY_MATRIX(every runtime mode and every explicit approval policy) andJ5_NEVER_PREAPPROVED_TOOLS, which each harness's test walks.docs/j5/product/features/crews.md(Definition, AC5, History) anddocs/user/personas.md: every provider can captain; on Codex and Claude the roster card is the only human step, other harnesses may prompt once first, and a read-only persona on them can't propose.Per-harness audit, from the code (a Captain's
propose_crew). Per Jackson's ruling on #233, only Codex and Claude get J5 pre-approval; the other rows stay as they are and are documented as prompting once:dontAskwith the allowlist)Why this shape
One list, decided per policy, is the smallest thing that keeps Captains and seats behaving the same on every harness. Each adapter only translates that list into its own approval model. The list stays a leaf module with no toolkit import, so adapters can import it without a cycle.
Invariants
j5/mainadded (feat(playbooks): persist agent-led runs and expose tools #248). Interactive modes get the coordination set plus owner-thread playbook progress.archive_agentto any harness's pre-approval (J5_NEVER_PREAPPROVED_TOOLS). The one exception is upstream's, not J5's: Claude pre-approves everymcp__t3-code__*tool in non-read-only sessions (claudeMcpQueryOverrides, upstream fix(orchestrator): scope Claude MCP tool pre-approval pingdotgg/t3code#3862).never.Surfaces
packages/contracts)docs/user/personas.mdCrews section.Out of scope
Upgrade and data
None.
Verification
vp test run apps/server/src/j5/a2a/mcp: passes, including the newj5ToolPreapproval.test.ts, which checks that the matrix covers everyRuntimeModeandProviderApprovalPolicyliteral and that the list matchesJ5Toolkit.Review focus
codexToolApproval.test.tsnow asserts through the shared matrix instead of hand-written lists. Check it still pins "per tool, never a server-wide default".Closes #233
Claude Opus 5.5 via Claude Code
🤖 Generated with Claude Code