Repository navigation
feat(j5): anyone who can write to the asking thread can allow a refused persona once - #1290
Merged
Merged
Conversation
Jacksondr5
marked this pull request as draft
November 28, 2026 22:02
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Jacksondr5
marked this pull request as ready for review
November 28, 2026 22:18
Jacksondr5
marked this pull request as draft
November 28, 2026 22:18
Jacksondr5
force-pushed
the
j5code/1284-allow-once-thread-writers
branch
from
November 28, 2026 22:20
76900fe to
8f47fbf
Compare
6 tasks
Jacksondr5
marked this pull request as ready for review
November 28, 2026 22:37
Jacksondr5
enabled auto-merge (squash)
November 28, 2026 22:37
Owner
Author
|
CodeRabbit hit its free review limit on this PR, so here is the Captain's review of the permission change at
No findings. Claude Opus 5.5 (Eng Lead). |
…ed persona once A Collaborator who drives a thread can already @persona any persona there, but only an Owner could press "Allow this once" on that thread's agent's blocked pick. allowPersonaOnce now needs operate scope, and the server lets through whoever writes to the thread of the agent that asked; anyone else is refused. The grant still records who granted it. Model-facing text, the personas contract and the user guide say who can allow it. Closes #1284 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…onaOnce Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sed persona Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5
force-pushed
the
j5code/1284-allow-once-thread-writers
branch
from
November 28, 2026 23:01
f358421 to
a1bd4a9
Compare
8 tasks done
This branch was successfully deployed
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
Only an Owner could press Allow this once on a refused persona (
allowPersonaOnceneededsettings:write). Yet a Collaborator who drives a thread can already@personathat same persona there and get its saved access and models. So in a Collaborator's thread, the agent asked the Collaborator, the Collaborator saw no button, and no grant could follow. Jackson decided on 2026-11-28 that anyone who could pick the persona themselves can allow their agent's pick once.Closes #1284
What changed
@personamessage passes command admission at thread scope (message.dispatch→collaboratoron the thread).turnPickSource(apps/server/src/j5/agents/agentPersonaPick.ts) counts it as a person's pick, so it runs with no limits.allowPersonaOncenow needsorchestration:operate. The handler (apps/server/src/j5/a2a/clientActionRpc.ts) runs the existingrequireWritesagainst the asking agent's thread, which it reads from the exchange'ssender_id. When a Captain asks for a member, that is the Captain's thread. Anyone who can't write to it is refused with the usual "You cannot write to this thread". The grant path itself (grantable,markGrantedwithgrantedBy) is unchanged and still records who granted it. The access gate (apps/server/src/j5/sharing/AccessGate.ts) now lets a narrowed session reach the method, as it doesanswerHumanExchange; live testing caught that it was missing.packages/contracts/src/j5/clientRpcPermissions.tsfollows the server, so the existingpermissionAtomshows the button to Collaborators on web, desktop and mobile. Save persona stays Owner-only.OwnerAskActionkeeps its name; only its comments changed.personaBlockText), the persona tools' shared rule (BLOCKED_PERSONA_TOOL_TEXT), theallow_oncerefusal,j5_send_message'sescalation_iddescription and the J5 agent instructions no longer say "an Owner". The refusal and the instructions tell the agent to ask the person driving its thread.agentContextBudget.jsonand FORK.md case 110 record the new numbers.docs/j5/product/agent-personas/index.md(Allow this once bullet, plus a History line),docs/j5/user/personas.md, theallow_oncesentence indocs/j5/product/features/crews.md, anddocs/j5/product/a2a/agent-tools.md, which quotes the tool text.Tests. A new case in
crewAccessRpc.test.tsruns the real handler over real people and levels. A Collaborator on the asking thread is allowed; a Viewer of it and a Collaborator on a seat beneath it are refused. It fails onj5/mainwith "Only an Owner of this server…". A gate assertion inAccessGate.test.tsshows a thread-scoped Collaborator reaches the handler. The existing scope tables and string assertions are updated to match.Evals (Jackson approved, subscriptions only). A new guard case,
j5-refused-persona-asks-the-personinevals/j5-cli/cases/persona-and-fork.ndjson, has the agent pick a persona itself and get the branch's refusal text back. It must ask the person withj5_send_message(expect_reply,escalation_id), and must not recreate the persona as a custom or plain worker or retry with anallow_oncenobody granted. Onevals/j5-cli, with the new case plus the three existing persona-and-fork cases, it passed 8/8 onclaude-sonnet-5-5and 8/8 ongpt-6.1-sol. Aj5/mainbaseline of the new case, run with the old wording, passed 2/2 on each model.UI changes
A project Collaborator's Inbox ask carrying J5's record of a refused persona. Before, there is no button; after, Allow this once is there for them.
The action area, enlarged.
The Collaborator allows the launch; the Inbox ask closes and the agent retries the persona successfully.
collaborator-allows-once.mp4
Live testing
Web: PASS on
76900fe9f3, by the Crew's web tester (GPT-6.1 Sol), on a test home fromsetup-agent-live-test.ts. Before was captured on42079472b0(j5/main).@personamention and was refusedmodels_exhausted(waivableaccess-above-caller). It then asked the Collaborator with the escalation id.grantedwithgranted_byset to the Collaborator's person id. The agent retried with thatallow_once, the Haiku child completed its task, and the row went toused, still granted by the Collaborator.The first run, on
fa25e8bf93, found the access-gate refusal that76900fe9f3fixes. The re-test paired a new browser device to the same person and used the same open ask.The head,
8f47fbf940, is76900fe9f3rebased ontoj5/mainafter #1288. The only conflict was a History line indocs/j5/product/agent-personas/index.md, and both lines are kept. No code changed, so I did not re-test it live;check:changedpasses on the head.Not exercised live:
Upstream impact
apps/server/src/provider/agentContextBudget.json: FORK.md case 110 (data; numbers updated in the case text).No change to what upstream's product does.
Checklist
FORK.md(case text and file-table row) in this PRdocs/j5/product/upstream.md(none: J5-only)OwnerAskAction), clients (web, desktop, mobile through the shared permission table), contracts, agents (tool text and instructions). Reverse state: none needed, since a grant is single-use.docs/j5/product/and user docs rewritten where this changes themBuilt by Claude Opus 5.5 in Claude Code (J5 Code), as the #1284 builder seat.
🤖 Generated with Claude Code