Skip to content

feat(j5): Don't allow on a refused persona's ask - #1300

Merged
Jacksondr5 merged 5 commits into
j5/mainfrom
j5code/1292-dont-allow-persona
Nov 29, 2026
Merged

Jacksondr5 merged 5 commits into
j5/mainfrom
j5code/1292-dont-allow-persona

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Problem

On an ask about a refused persona, the person could only press Allow this once or type a reply. There was no way to decline it, and after a typed "no" nothing told the agent what to do next, so it might relaunch the persona, recreate it as a custom worker, or ask again. Closes #1292.

What changed

Don't allow sits beside Allow this once on web, desktop and mobile, for exactly the same people: anyone who can write to the asking agent's thread.

  • Server: a new j5.inbox.declinePersona action takes the same checks as allowPersonaOnce (feat(j5): anyone who can write to the asking thread can allow a refused persona once #1290):

    • orchestration:operate scope;
    • narrowed in the access gate;
    • writesAskingThread.

    It answers the ask with a fixed reply and grants nothing. It adds no escalation state, so the escalation stays unallowed and a later allow_once retry is refused ("has not been allowed").

  • Each kind of answer replays only itself. A typed reply, Allow this once and Don't allow now answer under separate command-id prefixes. Before, Allow shared the typed reply's prefix. An Allow that reused that request id replayed the typed answer and then granted the escalation, though a typed reply must never allow it. A reused id now meets the closed ask and grants nothing.

  • The refusal text (personaBlockText) gets a matching line, so the agent knows what a decline means before it asks.

  • Clients: ownerAskAction (client-runtime) returns the decline with the allow. Web's OwnerAskAction and mobile's AnswerArea render it to the left of Allow this once, like upstream's Decline / Approve. Each button keeps its own retry id. The four new strings go through msg(), with the resolver signature feat(j5): J5's web and desktop screens in nine languages #1297 uses, and both clients pass useMessages(). The catalogs hold English values until they are translated.

  • Eval: guard case j5-declined-persona-stays-blocked, beside feat(j5): anyone who can write to the asking thread can allow a refused persona once #1290's j5-refused-persona-asks-the-person. A new personaDeclined turn in evals/j5-cli/j5Turns.ts renders the person's reply through the server's own formatClosedHumanEnvelope and declinedReply. The existing case's refusal mock picks up the new refusal line. Not run yet: running it waits for Jackson's approval.

  • Docs:

    • the persona contract's escalation bullet, rewritten, with a History line;
    • the Inbox definition: its paragraph said "one button only an Owner sees", so it is rewritten, and its heading is renamed Asks J5 recorded;
    • the personas user guide.

Mobile has had Allow this once since #1043, so on mobile only Don't allow is new. The issue predates that.

Model-facing text (for Jackson's OK)

New text only; nothing existing is reworded.

  • Fixed reply (declinedReply):

    Not allowed: reviewer stays blocked for this launch (escalation-…). Don't ask again about it, and don't recreate the persona as a custom worker or plain agent. Do the work another way within your limits, or ask the person how to proceed. If you asked on a Crew member's behalf, tell it.

  • Refusal line, appended for a block one exception can lift, after "If they allow it once, retry the same launch with allow_once set to the escalation_id.":

    If they don't allow it, it stays blocked: don't ask again for it.

  • Hover text and accessibility hint (UI copy):

    Keeps reviewer blocked for this launch and tells the agent not to ask again.

UI changes

Web. A Collaborator's Inbox, with the same ask before and after.

Before After
Collaborator Inbox ask about a refused persona, before Collaborator Inbox ask about a refused persona with Don't allow, after

The ask's actions, enlarged.

Before After
Refused persona ask actions, before Refused persona ask actions with Don't allow, after

The fixed reply the agent receives.

Don't allow fixed reply delivered to the asking agent, after

The agent then reviews the file itself, within its own limits.

Agent reviews the file inline after Don't allow, after

A retry with the declined escalation is refused.

allow_once retry with the declined escalation refused, after

Declining, then the agent's turn:

collaborator-declines-persona.mp4

Android. The Inbox ask before and after. Don't allow, Allow this once and Answer fit a phone-width row.

Before After
Android Inbox ask about a refused persona, before Android Inbox ask with Don't allow, Allow this once and Answer, after

The ask closed after Don't allow.

Android Inbox ask closed after Don't allow, after

Tapping Don't allow, with its spinner, on Android:

android-decline-share.mp4

Live testing

Web: pass (tester-web, at 7280429abc; before at bcc21e2b39).

  • A project Collaborator with no server role kept the same browser, session and open ask across the upgrade. Before, the ask showed only Allow this once; after, Don't allow sits to its left, with the hover text above.
  • Don't allow closed the ask and delivered the fixed reply. The stored escalation stayed open and ungranted (null granted_by, granted_at, used_at), across a server restart too.
  • A real Claude Haiku turn reviewed the file itself. It made no delegate, spawn or send call afterwards, recreated nothing, and didn't ask again. A requested allow_once retry was refused with "has not been allowed".
  • The fixture blocked a Full access Haiku persona from a Supervised thread (access-above-caller), to keep every turn on Haiku.

Android: pass (tester-mobile, at head 5c19752010; before at bcc21e2b39).

  • The three actions fit a phone-width row with no clipping (Open thread wraps onto its own line).
  • Don't allow closed the ask and delivered the exact fixed reply; the escalation's grant fields stayed null.
  • The Haiku agent finished the review inline with no delegation, allow_once, recreation or second ask.
  • Both mobile builds ran against the head's server with the same synthetic ask, so the pair compares the mobile UI.

Commits after 7280429abc, and why web wasn't re-run:

  • 9e6563d9f4 and ccfa6b2e60: separate command-id prefixes per answer kind. Server-only; the service test covers each case.
  • 9e6563d9f4 also carries the eval case and the Inbox doc.
  • bc136461fa and 5c19752010: msg() wrapping and catalogs. These render the same English, and Android ran at the head.

Not exercised live:

  • the Captain's pinned card (it shares OwnerAskAction and AnswerArea with the Inbox);
  • a Viewer's view of the ask (the permission tests cover refusal);
  • desktop;
  • a Codex agent;
  • iOS;
  • a non-English locale (no translations yet);
  • taps on the other buttons during Don't allow's ~0.4 s pending state (the spinner shows in the video).

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
    • crewAccessRpc.test.ts: a writer on the asking thread may decline; a Viewer, or a writer on a seat's thread, is refused.
    • AccessGate.test.ts: a narrowed Collaborator reaches the handler.
    • ClientActionsService.test.ts: the fixed reply, nothing granted, and no replay across answer kinds.
  • UI changes: before/after screenshots above, and a video for motion or interaction
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: none edited. Everything is in J5-owned paths, and packages/contracts/src/j5.ts is J5's.
  • Upstream product: unchanged
  • Surfaces:
    • entry points: the Inbox and the Captain's pinned card, through the shared components;
    • clients: web, desktop (wraps web) and mobile;
    • contracts and client RPC permissions;
    • access gate;
    • providers: not provider-shaped;
    • reverse state: none; a decline is final, as an answer is, and the agent may ask with a new escalation;
    • connection modes: unchanged, the same RPC path as Allow.
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Built by Claude Opus 5.5 in Claude Code, running as a J5 Code Crew seat (builder-1292). Reviewed by reviewer-opus and reviewer-sol; tested by tester-web and tester-mobile.

🤖 Generated with Claude Code

Jacksondr5 and others added 5 commits November 28, 2026 18:31
An ask about a refused persona offered only Allow this once or a typed
reply, and a typed "no" left the agent without a rule for what to do
next. j5.inbox.declinePersona answers the ask with a fixed reply that
keeps the persona blocked and tells the agent not to ask again or
recreate it. It needs the same scope, access-gate entry and
asking-thread check as allowPersonaOnce, grants nothing, and adds no
escalation state, so a later allow_once is refused. Web and mobile show
Don't allow beside Allow this once, and the refusal text says what a
decline means.

Closes #1292

Co-Authored-By: Claude Opus 5.5 <[email protected]>
An Allow this once that reused a decline's request id replayed the
decline's committed answer and then granted the escalation. The decline
now answers under its own command-id prefix, so that Allow meets the
closed ask instead. The eval case also forbids relaunching the same
persona without allow_once, and the Inbox definition says who sees each
button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The new label, pending label, failure and hover text go through msg()
in ownerAskAction, which takes a resolver as #1297 has it, and web
passes useMessages(). The catalogs carry the four keys in English until
they are translated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Allow this once and a typed reply shared one command-id namespace, so an
Allow that reused a typed answer's request id replayed that answer and
then granted the escalation, though a typed reply never allows it.
Allow now answers under its own prefix, as Don't allow does, so a reused
id meets the closed ask and grants nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The mobile Inbox passes useMessages() to ownerAskAction, as web does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Nov 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 29, 2026 9:59am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c8bc5c9 and 5c19752.

Files selected for processing: 42

  • apps/mobile/src/i18n/translations/de.json
  • apps/mobile/src/i18n/translations/en.json
  • apps/mobile/src/i18n/translations/es.json
  • apps/mobile/src/i18n/translations/fr.json
  • apps/mobile/src/i18n/translations/ja.json
  • apps/mobile/src/i18n/translations/ko.json
  • apps/mobile/src/i18n/translations/pt-BR.json
  • apps/mobile/src/i18n/translations/ru.json
  • apps/mobile/src/i18n/translations/sv.json
  • apps/mobile/src/i18n/translations/zh.json
  • apps/mobile/src/j5/inbox/AnswerArea.tsx
  • apps/mobile/src/j5/inbox/OwnerAskAction.tsx
  • apps/server/src/j5/a2a/ClientActionsService.test.ts
  • apps/server/src/j5/a2a/ClientActionsService.ts
  • apps/server/src/j5/a2a/clientActionRpc.ts
  • apps/server/src/j5/a2a/crewAccessRpc.test.ts
  • apps/server/src/j5/agents/agentPersonaEscalation.ts
  • apps/server/src/j5/sharing/AccessGate.test.ts
  • apps/server/src/j5/sharing/AccessGate.ts
  • apps/server/src/j5/wsRpc.test.ts
  • apps/web/src/i18n/translations/de.json
  • apps/web/src/i18n/translations/en.json
  • apps/web/src/i18n/translations/es.json
  • apps/web/src/i18n/translations/fr.json
  • apps/web/src/i18n/translations/ja.json
  • apps/web/src/i18n/translations/ko.json
  • apps/web/src/i18n/translations/pt-BR.json
  • apps/web/src/i18n/translations/ru.json
  • apps/web/src/i18n/translations/sv.json
  • apps/web/src/i18n/translations/zh.json
  • apps/web/src/j5/a2a/OwnerAskAction.tsx
  • apps/web/src/j5/a2a/humanInboxClient.ts
  • docs/j5/product/agent-personas/index.md
  • docs/j5/product/features/inbox.md
  • docs/j5/user/personas.md
  • evals/j5-cli/cases/persona-and-fork.ndjson
  • evals/j5-cli/j5Turns.ts
  • packages/client-runtime/src/j5/inbox.test.ts
  • packages/client-runtime/src/j5/inbox.ts
  • packages/client-runtime/src/j5/state.ts
  • packages/contracts/src/j5.ts
  • packages/contracts/src/j5/clientRpcPermissions.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Nov 29, 2026
@Jacksondr5
Jacksondr5 merged commit 163e01d into j5/main Nov 29, 2026
39 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/1292-dont-allow-persona branch November 29, 2026 21:27
Jacksondr5 added a commit that referenced this pull request Nov 29, 2026
…s (part of #1180)

Main's catalogs, regenerated for this branch's source, with the reviewed
translations applied again. #1300's four new strings hold English until
they are translated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jacksondr5 added a commit that referenced this pull request Nov 29, 2026
Jacksondr5 added a commit that referenced this pull request Nov 29, 2026
* feat(i18n): J5's client-runtime copy is ready for translation

J5's shared client helpers built their labels as English strings, so web
and mobile could not show them in the person's language. Each helper now
marks its copy with msg() from gt-i18n and takes a resolve parameter that
defaults to mFallback, as upstream's client-runtime helpers do. Sentences
built from fragments become one ICU string with the same English. The
untranslated-copy exclusion narrows to apps/mobile/src/j5 (FORK.md 129).

Call sites keep English through mFallback until each folder's pass
passes m or useMessages().

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): the rest of J5's client-runtime sentences take a resolver

Helpers that built English from template literals, which the lint rule
does not flag, now return msg() sentences too: the Inbox's source notices
and count line, the waits-for-server line, persona swaps (optionally the
whole sentence with the step's title), spawned-agent group summaries, and
the peering check's reach errors and route lines.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): J5's sharing, skills and agents screens are ready for translation

Every string in apps/web/src/j5/{sharing,skills,agents} is wrapped in
<T>, gt() or msg(), with sentences that were built from fragments
rewritten as one ICU string that renders the same English. Helpers called
in render take a resolver that defaults to m. The client-runtime helpers
get useMessages() in render and m in handlers. The join page's dead
invitationFor helper and its test go, since the page now renders whole
sentences.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): the desktop find bar speaks the UI language

The find bar's page was a fixed English HTML string, and its count was
formatted in the sandboxed page. The main process now builds the page
from msg() strings through desktop's m(), and sends the count's text.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(web): wrap J5's web screens for translation (part of #1180)

Every string `t3code/no-untranslated-copy` flags in apps/web/src/j5, outside
sharing, skills and agents, is now wrapped with <T>, gt() or msg(), plus the
fragment-built sentences and plurals the rule misses. The English renders
unchanged. The lint exclusion narrows to apps/mobile/src/j5.

The highlights palette entry becomes a hook so its title can translate, and
the channel-switch helpers take the resolver updateEverything already holds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(web): J5's web screens pass the resolver to client-runtime copy (part of #1180)

Wires the client-runtime J5 helpers that now take a resolver: Fleet facts,
the Inbox, worktree cleanup, archive warnings, platform notices and prompts,
Crew notices and proposals, highlights, playbooks and peering. Crew notice
and platform notice pieces become components so they can read the active
language, and the credential note under a failed link checks the step's
kind instead of its English title.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(fork): cases 7 and 120 pass J5's resolver (part of #1180)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(web): Fleet's Crew count labels give GT a literal $context (part of #1180)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): web passes resolvers to the last client-runtime sentences

The Inbox's source notices, count line and waits-for-server line,
Fleet's source notices, the Crew proposal card's persona swaps (now one
sentence with the step title), spawned-agent group summaries, and the
peering check's reach errors and route lines now render in the UI
language.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(i18n): add J5's new keys to the web, mobile and desktop catalogs

Generated with i18n:generate. Every locale holds the English text for
the new keys until the translations are written.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(i18n): no translated phrase fills a slot in another sentence

German review: stand-ins such as "whole server", "this server", "each
ticked server", "it", "moments" and "Access", and the level and skill
category words, were translated on their own and then placed into other
sentences, where German and Russian need a different case or article.
Each such sentence is now whole per case: an ICU select on where the
level is held, what is shared, which side is every ticked server, the
level itself, or the skill category. A link request names the agent's
server by its own label. The Crew context line has a sentence per kind.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(web): an already-joined browser is told it joins as "an Owner"

The sentence read "as a Owner" since before #1180. The six variants now
say "an Owner", and the catalogs carry the new keys.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): J5's web and desktop screens in nine languages (part of #1180)

The reviewed translations for J5's web, client-runtime and desktop copy
go into the de, es, fr, ja, ko, pt-BR, ru, sv and zh catalogs. Where web
and mobile share a client-runtime key, mobile's catalogs get the same
words with their own element types.

Refs #1180

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(i18n): PR 1 review round 1 (part of #1180)

- J5's newer-server and not-shared errors carry marked text, as
  upstream's do; the compatibility error reuses upstream's key.
- A duplicated persona's prefilled name stays English: it is saved
  into the server's library.
- The desktop find bar's page is rebuilt on each UI language switch
  and carries the language as its lang (FORK.md case 126).
- The Share dialog's made-link sentences say "expires in moments" and
  "Access" again, inside each whole sentence.
- "Just now" is decided from the elapsed time, not by comparing
  formatted text; answeredAgeLabel takes the flag.
- FORK.md case 120 names both channel-switch helpers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(web): a Crew seat's access reads in the UI language (part of #1180)

The Crew card and the seat editor showed the server's English access
label ("Full access") in every language. The server writes upstream's
runtime-mode label or a persona's "Read only", so the client now shows
the translated label for the seat's runtime mode, and the server's
words for anything else.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(web): a persona seat's "Repository write" access is translated too (part of #1180)

The server's other persona access word now maps to its own key, beside
"Read only". Every locale holds English until the translation lands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(i18n): regenerate the catalogs on j5/main with J5's translations (part of #1180)

Main's catalogs, regenerated for this branch's source, with the reviewed
translations applied again. #1300's four new strings hold English until
they are translated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(i18n): translate #1300's decline strings (part of #1180)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 5c197520 Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personas: "Don't allow" on a refused persona's ask

1 participant