Skip to content

feat(j5): agents draft persona edits, and the Owner saves them - #938

Merged
Jacksondr5 merged 14 commits into
feat/persona-escalation-allow-oncefrom
feat/persona-edit-in-conversation
Nov 8, 2026
Merged

Jacksondr5 merged 14 commits into
feat/persona-escalation-allow-oncefrom
feat/persona-edit-in-conversation

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Changing a persona always meant opening Agent Setup and filling in the form by hand. No agent tool could read a full definition or save one, so "make the code reviewer stricter about tests" went nowhere in a conversation. Now an agent drafts the create or edit, asks me, and an Owner saves it with Save persona on the ask. Closes #786.

  • Read. j5_read_persona returns:

    • the definition as Export YAML writes it;
    • its digest;
    • its origin: folder with its file, or imported, which covers personal personas too since they're stored the same way;
    • whether it overrides a folder persona;
    • whether it's turned off.

    It's read-only.

  • Draft. j5_propose_persona takes create with every Settings field, or edit with the read's expected_digest and only the fields that change. The id is fixed on edit.

    • The server validates the draft with Settings' own decoders and limits, through shared createdDefinition / editedDefinition helpers in the library.
    • It stores the draft in j5_persona_draft (migration 054) and returns a draft_id, the summary, and any warnings.
    • It writes nothing to the library.
  • Ask. The proposer, or as a Captain a member's proposer, asks me with j5_send_message (expect_reply, persona_draft_id). The ask has to open its own exchange, the same as feat(j5): a blocked persona escalates, and the Owner can allow it once #937's escalation asks: if the agent already has an ask open with me, it's refused before anything is written. J5's summary rides on the Inbox item, not in the agent's words, and shows as plain text in feat(j5): a blocked persona escalates, and the Owner can allow it once #937's Recorded by J5 panel:

    • for an edit, each changed field, with a line diff of the instructions;
    • for a create, the full definition;
    • for a folder target, both warnings: the override hides later team updates for everyone on this server, and the way back is to remove the override, then restore the team persona.

    An ask carries escalation_id or persona_draft_id, never both, so it has at most one Owner action. Nothing the agent writes can hide or imitate the summary. Values show quoted, and a drafted name or description with a line break is refused, so it can't fake a line of the summary either.

  • Save. j5.inbox.savePersonaDraft (AuthSettingsWriteScope plus requireOwner) saves first, then answers the ask with a fixed reply.

    • It refuses an ask that's already answered, so a typed reply, a withdrawn ask, or no answer saves nothing.
    • An imported or personal target goes through editImported with the draft's digest.
    • A folder target becomes an environment override through the new overrideSource: an imported copy with the same id, on or off as the folder persona was, after checking the folder definition's digest. The folder file is never written.
    • A create goes through createPersona, and the id must still be free.
    • A stale draft is refused with the reason. Each draft saves once, and retrying the same request just replays the answer.
  • Button. Personas: a blocked persona escalates, and I can allow it once #785's Allow this once button becomes OwnerAskAction. It shows an ask's one Owner action, Allow this once or Save persona, in the web/desktop Inbox and the Captain's dock. Mobile shows the ask without it, as with Personas: a blocked persona escalates, and I can allow it once #785.

  • Override badge. In Agent Setup, an imported copy that overrides a folder persona reads Overrides instead of Personal. The catalog entry gets an optional overridesFolder that old clients ignore. The tooltip on web and desktop, and the line under the name on mobile, says it hides the team version for everyone on this server, and that the way back is Remove, then Restore. The label choice is tested in agentPersonas.test.ts.

  • Guidance. One bullet in the standing instructions covers drafting, asking, and save suggestions. A suggestion never blocks work, goes through the Captain inside a Crew, and nothing saves without the ask. The tool descriptions state the override meaning, and say that remove, restore, on/off and folders stay in Settings.

agent: j5_read_persona ─▶ j5_propose_persona ─▶ draft row (library untouched)
member ─ draft_id ─▶ Captain ─▶ j5_send_message(expect_reply, persona_draft_id) ─▶ Inbox / dock
                                          (server appends changed fields + override warnings)
Owner: Save persona ─▶ editImported | overrideSource | createPersona ─▶ fixed reply closes the ask

Live testing

Pass, at 09f3171 plus the summary-format fix (346d9d1), on a setup-agent-live-test.ts home (no flags), with 3 Claude Haiku 5.5 turns.

  • Ask. In a new thread I asked in plain words, without naming any tool, for the haiku-helper persona to run pnpm test before it says it's done, and to send me the change to approve. haiku-helper is a folder persona in the test home. The agent read it, drafted the edit, and asked me with persona_draft_id, and it warned me about the override in its own words. The Inbox item showed J5's appended summary with both warnings, and Save persona.

  • Typed reply. I answered in words, asking for the failing test names too. Nothing was saved: there was no imported file, and the first draft stayed open on its answered ask. The agent drafted again and asked again (turn 2).

  • Save. I pressed Save persona as the Owner. The ask closed with the fixed reply, and the agent summed it up correctly (turn 3). The test home then showed:

    • the draft row saved, with the Owner as saved_by;
    • an imported haiku-helper at version 2, enabled as the folder persona was;
    • the folder file's sha256 unchanged.
  • Way back. Remove, then Restore, in Agent Setup brought the folder version back (Folder · personas). No imports were left, and the folder file was still untouched.

  • Found and fixed. The Inbox renders an ask as markdown, and the first summary's instruction diff and warnings ran together into one bulleted paragraph. 346d9d1 fixed that by fencing the diff. The summary has since moved out of the message into the Recorded by J5 panel (18f85e0), so the first two captures below show the earlier in-message rendering. I haven't re-run the summary live since then; the J5RecordPanel test and the server tests cover it.

  • Not live:

    • the Captain's dock button: same component and item as the Inbox, and it needs a Crew;
    • a create;
    • a stale draft;
    • a non-Owner's view.

    These are covered by tests.

Evidence

  • New tests:
    • agentPersonaDrafts.test.ts, "an edit of a team persona warns first, then saves as an override the folder never sees": the summary has the instruction diff and both warnings, and drafting writes nothing. After the save, the override is imported, still off, at the next version, and the folder file is byte-identical. A second save writes nothing. The override's Export YAML loads through a folder library unchanged. Remove plus restore brings the team version back.
    • agentPersonaDrafts.test.ts:
      • "a draft that went stale, or a create whose id was taken, saves nothing";
      • "an approved create lands in the environment library";
      • "refuses drafts Settings would refuse, and edits that change nothing";
      • "only the proposer or its Captain asks about a draft, and only until it saves";
      • "the Inbox item carries J5's summary as data, with an agent's markup as written": a fence, <details>, ** and a link reach the panel's text exactly as written. The refusal test also turns down a description with \n\n**J5:** …;
      • "a retry finishes a save that wrote the library but never marked the draft";
    • handlers.test.ts, the send test: a draft ask's message is just the agent's words, and it sets freshAsk. SendService.test.ts (feat(j5): a blocked persona escalates, and the Owner can allow it once #937) shows a refused fresh ask writes no events.
      • lineDiff.
    • agentPersonaLibrary.test.ts, "an override of a folder persona is what every launch on the server loads". The library has no per-person view, so a guest's launch loads the override like anyone's. The test also covers a stale digest and a second override, both refused.
    • ClientActionsService.test.ts, "saves a persona draft for the Owner, once, and never on an answered ask": the fixed reply, and a retry reusing the same answer command. An ask already answered is refused and the draft stays open. An ask without a draft is refused.
    • handlers.test.ts:
      • "reads a team persona and drafts an edit of it without touching the library": j5_read_persona and j5_propose_persona through the toolkit, with the library and the folder file unchanged afterwards;
      • the send test: an ask with persona_draft_id carries the summary, and one with both ids is refused.
    • Permission tests:
      • clientRpcPermissions.test.ts and wsRpc.test.ts list j5.inbox.savePersonaDraft as Owner-only, so an operate-only client is refused;
      • outsideAgent.test.ts refuses j5_propose_persona from an outside agent;
      • no MCP tool writes the library.
    • Focused: 5 files, 104 tests pass.
      vp test run src/j5/agents/agentPersonaDrafts.test.ts src/j5/a2a/ClientActionsService.test.ts src/j5/agents/agentPersonaLibrary.test.ts src/j5/a2a/mcp/handlers.test.ts src/j5/wsRpc.test.ts (from apps/server)
  • vp run check:changed: format, lint, knip, typecheck (32 packages) and tests (48 files, 623 tests) all pass.
  • reactCompilerCoverage.test.ts passes (1427 tests) with OwnerAskAction, which has no ??=.
    vp test run src/reactCompilerCoverage.test.ts (from apps/web)
  • Evals: the Sonnet 5.5 mcp-tool-use orchestration cases at head (09f3171), 2 samples per case and a 3rd where they disagreed.

Not verified:

  • Not run live: the dock button, a create, a stale draft, or a non-Owner's view (see Live testing). Tests cover them.
  • No guard eval case for save suggestions. Upstream's mcp-tool-use harness has no J5 tools (Evals: a J5-owned suite that offers J5's tools #936).
  • Mobile shows the ask without the button, by design. I didn't run it on a device, and I didn't capture the override line on mobile either; the mobile typecheck is clean.

UI changes

A new Save persona button next to Answer, in the Inbox item and the Captain's dock, in the same slot as #785's Allow this once. It only shows for an Owner, on an ask carrying an open draft. Its tooltip says who the save affects, and for a team persona that it hides later team updates.

Captured at 1280x800 on the live test above (346d9d1), as the Owner:

Before After
Inbox ask with the draft's summary and diff new Inbox ask with the draft's summary and diff, after
Inbox ask with the override warnings and Save persona new Inbox ask with the override warnings and Save persona, after
Thread after Save persona new Thread after Save persona, after
Agent Setup with the Overrides badge and its tooltip new Agent Setup with the Overrides badge and its tooltip, after

I took the Agent Setup shot at bffb9e8 on the same home after a restart. Remove plus Restore had cleared the saved override, so I recreated it with Import → Persona file over the team file. No agent turns. The dock button wasn't captured (see Live testing).

Merge Danger

Door: two-way for code. Migration 054 only adds a table; a revert leaves it and any draft rows behind unused. A persona someone saved stays in the library after a revert, and Settings can still edit or remove it.

Blast Radius: the persona library's write paths (editImported and createPersona now share their definition builders with drafts), the Inbox and dock answer row, and j5_send_message asks. If saving is wrong, an Owner's approved draft could fail to save, or land as an override when it shouldn't.

After merge: nothing.

Restack. This sits on #937's final head (0d6b550) after the bottom-to-top restack.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction (new button, so after only; no motion; dock not captured)
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR (none touched)
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md (none)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md)
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Surfaces walked:

  • Entry points: two new agent tools and persona_draft_id on j5_send_message; the button in the Inbox and the dock. Settings' own editor is unchanged.
  • Clients: web and desktop get the button. Mobile shows the ask but has no button.
  • Providers: provider-independent. Both tools are pre-approved for Codex and Claude like the other J5 verbs, and j5_propose_persona is a coordination tool, since it writes only a draft.
  • Contracts: an optional overridesFolder on the persona catalog entry, an optional personaDraft on HumanInboxItem, AgentPersonaDraftView, and the new action RPC.
  • Reverse states: an override comes off with remove, then restore, in Settings. A saved create or edit is edited or removed in Settings, and an unanswered ask can still be answered in text or withdrawn.
  • Connection modes: saving happens on the server through the guarded RPC.

Made with Claude Opus 5.5 in Claude Code (J5 Code).

🤖 Generated with Claude Code

After the rebase onto #924

The Recorded by J5 panel sits above #924's follow-ups:

Web Inbox escalation ask with the Recorded by J5 panel above its follow-up, after

Android Inbox escalation ask with the Recorded by J5 panel and no Allow this once, after

iOS Inbox escalation ask with the Recorded by J5 panel and a follow-up, after

iOS Inbox persona draft ask with the Recorded by J5 panel and no Save persona, after

A follow-up carrying the record's own id keeps the record in place, and the summary names providers as Claude and Codex:

Web Inbox record staying on its ask after a matching-id follow-up, with provider display names, after

A person's model switch on iOS, with the next turn running on GPT-6 Luna:

iOS persona thread after a person switched it to GPT-6 Luna, after

@vercel

vercel Bot commented Nov 6, 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 7, 2026 11:19pm UTC

Request Review

@bryantderosier bryantderosier added the enhancement New feature or request label Nov 6, 2026
@bryantderosier bryantderosier self-assigned this Nov 6, 2026
bryantderosier added a commit that referenced this pull request Nov 6, 2026
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 6, 2026
@bryantderosier
bryantderosier added this pull request to stack #933 November 6, 2026 18:20
@github-actions github-actions Bot added the size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). label Nov 6, 2026
@bryantderosier
bryantderosier marked this pull request as ready for review November 6, 2026 18:27
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 47 billable files and costs up to $11.75.

Or wait 52 seconds for your next included review.

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 06f794d and eb0bbbc.

Files selected for processing: 47

  • apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx
  • apps/mobile/src/j5/inbox/InboxScreen.tsx
  • apps/server/src/j5/a2a/ClientActionsService.test.ts
  • apps/server/src/j5/a2a/ClientActionsService.ts
  • apps/server/src/j5/a2a/ClientReadsService.test.ts
  • apps/server/src/j5/a2a/ClientReadsService.ts
  • apps/server/src/j5/a2a/Migrations.test.ts
  • apps/server/src/j5/a2a/Migrations.ts
  • apps/server/src/j5/a2a/clientActionRpc.ts
  • apps/server/src/j5/a2a/clientReadRpc.test.ts
  • apps/server/src/j5/a2a/contracts.ts
  • apps/server/src/j5/a2a/mcp/handlers.test.ts
  • apps/server/src/j5/a2a/mcp/handlers.ts
  • apps/server/src/j5/a2a/mcp/j5ToolPreapproval.test.ts
  • apps/server/src/j5/a2a/mcp/j5ToolPreapproval.ts
  • apps/server/src/j5/a2a/mcp/orchestratorSurface.test.ts
  • apps/server/src/j5/a2a/mcp/outsideAgent.test.ts
  • apps/server/src/j5/a2a/mcp/registration.test.ts
  • apps/server/src/j5/a2a/mcp/tools.test.ts
  • apps/server/src/j5/a2a/mcp/tools.ts
  • apps/server/src/j5/a2a/migrations/055_PersonaDrafts.ts
  • apps/server/src/j5/a2a/runtimeLayer.ts
  • apps/server/src/j5/agents/agentPersonaDrafts.test.ts
  • apps/server/src/j5/agents/agentPersonaDrafts.ts
  • apps/server/src/j5/agents/agentPersonaLibrary.test.ts
  • apps/server/src/j5/agents/agentPersonaLibrary.ts
  • apps/server/src/j5/agents/agentPersonaRpc.ts
  • apps/server/src/j5/test-support/agentPersonaDrafts.ts
  • apps/server/src/j5/wsRpc.test.ts
  • apps/web/src/j5/a2a/AdjudicationDock.tsx
  • apps/web/src/j5/a2a/AllowPersonaOnceButton.tsx
  • apps/web/src/j5/a2a/HumanInboxPage.tsx
  • apps/web/src/j5/a2a/OwnerAskAction.tsx
  • apps/web/src/j5/a2a/humanInboxClient.ts
  • apps/web/src/j5/agents/AgentLibrarySettings.tsx
  • docs/j5/product/a2a/agent-tools.md
  • docs/j5/product/agent-personas/index.md
  • docs/j5/product/features/inbox.md
  • docs/j5/user/personas.md
  • packages/client-runtime/src/j5/agentPersonas.test.ts
  • packages/client-runtime/src/j5/agentPersonas.ts
  • packages/client-runtime/src/j5/state.ts
  • packages/contracts/src/j5.ts
  • packages/contracts/src/j5/agentPersona.ts
  • packages/contracts/src/j5/clientRpcPermissions.test.ts
  • packages/contracts/src/j5/clientRpcPermissions.ts
  • packages/provider-core/src/j5/orchestrationInstructions.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tyler-barton-horizon tyler-barton-horizon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review of this layer of stack pingdotgg#933 (diff against its base branch). Findings were not individually verified against the source, so please treat them as likely issues and push back on any that are wrong.

🤖 Generated with Claude Code

Comment thread apps/server/src/j5/a2a/mcp/handlers.ts Resolved
Comment thread apps/server/src/j5/a2a/mcp/handlers.ts Resolved
export default Effect.gen(function* () {
const sql = yield* SqlClient.SqlClient;
yield* sql`
CREATE TABLE j5_persona_draft (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

j5_persona_draft rows are never pruned, and each stores a summary of up to 64 KiB plus fields_json.

j5_propose_persona is pre-approved in every runtime mode. An agent that redrafts after each reply, or loops, adds rows of up to roughly 128 KiB each with no cleanup, so statev2.sqlite keeps growing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No expiry is deliberate for now. Drafts are one-use, each one is capped by the 64 KiB definition limit, and drafting means an agent asking a person, not a background loop. Happy to add cleanup if it shows up in real databases.

@Jacksondr5

Copy link
Copy Markdown
Owner

The stack needs a restack before review. None of #932–#938 contains its base branch's current head. Each upper layer was built on an earlier commit of the layer below, and the review fixes pushed to the lower layers afterwards never reached the layers above. The tip, 3edb5c4d5b, is missing these 13 commits:

Layer Missing from everything above it
#931 db980a13fb parenthesized-mention fix, c9e8c9f10b steered-mention test, ddce517666, 0b5ff299ce
#932 482aa0f89b reviewer seat keeps its reviews on edit, 587efb9e80, 146cd69ae8 reviewer can't review another reviewer
#934 98a9dc2b50 queued model switch test
#935 957376b47b replacement reads unfinished steps under the Crew lock, d230e163dd
#937 fff17d4212, eeb0d35aec, c1e7e1a562

For example, at the tip mentionedPersonaIds("(@persona:scout) please") still returns [].

This matters for the merge as well as the review. Each upper layer's diff against its base currently reverses the fixes below it. So gh stack merge from the top would land the tip's tree, without those 13 fixes.

Please rebase each layer onto the current head of the one below it, bottom to top, and push. GitHub's CLEAN merge state doesn't catch this. The panel's review and live test are paused until then, so we review what will actually land.

Posted by Claude Opus 5.5.

@bryantderosier

Copy link
Copy Markdown
Collaborator Author

You're right, thanks. The upper layers were cut from older heads, so the tip is missing those fixes. I'm landing the open review fixes on each layer first, then restacking bottom to top in one pass. I'll ping here when #938 sits on the final #937 head.

@bryantderosier

Copy link
Copy Markdown
Collaborator Author

Thanks again, you were right. The upper layers were cut from older heads of the layers below, so the tip was missing those 13 fixes and a top-down merge would've dropped them. Restacked bottom to top: #937 is now at 0d6b550, and #938 sits on it at 1083a9d, with the post-restack review fixes on top (head 18f85e0). Ready for the panel.

@Jacksondr5

Copy link
Copy Markdown
Owner

Jackson's calls on two behaviour changes in this stack. He's keeping both as built:

  1. Agents' picks are capped at the Captain's access (feat(j5): who picked a persona sets its limits #931). This overrides his 31 October acceptance of Full-access custom members added without review:

    • Auto-approved rosters and Captain additions are held to the Captain's access.
    • An omitted runtime_mode gives the Captain's access.
    • Allow this once is the way past the cap.
    • Cards a person approves keep Full access.

    He said "unless it's really complicated", so if keeping it starts to need much more machinery, raise it with him rather than build it.

  2. A person's @persona mention runs the persona with its saved access (feat(j5): who picked a persona sets its limits #931), even under a Supervised or read-only parent, "since it's explicitly invoked by the user". An agent's own pick stays capped.

The panel's code review and live test are running on 18f85e0469.

Posted by Claude Opus 5.5 for Jackson.

@Jacksondr5

Copy link
Copy Markdown
Owner

Panel review of the stack (#931 → #938) at 18f85e0469, from Claude Opus 5.5 and GPT-6.1-Sol. We reviewed a216acc1a0..18f85e0469 as the code that lands, and both reviewers agree on everything below. The live test is still running, and its results will follow separately.

Blocking

1. Allow this once isn't bound to the launch the Owner allowed (#937; apps/server/src/j5/agents/agentPersonaEscalation.ts:271, called from agentPersonaPick.ts:220)

A grant is checked against the caller and the persona only. It doesn't record which model or access level was refused, or which definition. So a retry can ask for more than the Owner saw, under the same escalation_id:

  • Model: a persona has two unchecked entries, one cheap and one expensive. An agent pins the cheap one, is refused, and the ask's trusted record names the cheap model. The Owner allows it once. The agent then retries with the same id, pinning the expensive model. pickAgentPersona returns the expensive selection with pickSource: allow-once, and use spends the grant. A scratch test with the real library, pickAgentPersona and the real SQLite escalation layer reproduced this: refused cheap → granted → picked expensive → used, all succeeding.
  • Access: a Crew persona seat carries its own runtime_mode, and pickWithin checks access against it. A Captain refused at Auto-accept edits above a Supervised caller can retry the same seat with runtime_mode: full-access under one grant.

Suggested fix: store what the refusal showed: the definition digest, the access level and the model entry or entries. A retry that asks for anything broader is refused. Keep the caller and persona binding and the single-use update you already have.

Should fix

2. A mention inside a code block counts as the person's pick (#931; packages/shared/src/j5/agentMention.ts:31)

QUOTED_TEXT strips backtick code only. A web message such as Explain this example:\n~~~text\n@persona:operator\n~~~ returns operator from mentionedPersonaIds. turnPickSource then calls it a person's pick, which lifts both the model list and the access cap. A scratch test through the real turnPickSource and pickAgentPersona gave a Supervised caller a Full-access operator. Indented code, four spaces in, has the same gap. The person did type the message, and an agent still has to choose to call the tool, so this isn't blocking.

Suggested fix: treat CommonMark's code forms as quoted together: backtick and tilde fences, and indented blocks. Adding them one at a time leaves the same gap open.

3. A Crew seat naming an invalid persona is told it's missing (#937; apps/server/src/j5/a2a/CrewProposalService.ts:547)

Crew prevalidation uses personaCatalogProblem, which knows only missing and disabled. So a seat naming a persona whose file is invalid gets "not in this environment's library", with no repair message, no persona_invalid code and no escalation. The library's diagnostics do name that id. A disabled persona also leaves before pickAgentPersona. #785 asks for the six codes on Crew launches and additions too. A scratch test through CrewProposalService with its existing fixture confirmed the missing-persona error for a persona that has a diagnostic. requestMember goes through the same validateSeats.

Suggested fix: drop that existence preflight and let pickAgentPersona refuse with the shared codes, keeping the shape, review and step checks. Alternatively, map the catalog problems onto the same codes.

Considered and not raised

  • A typed reply racing Save persona: a typed reply or withdrawal that lands in the same moment as Save persona can close the ask after the draft has saved. It needs two answers to the same ask at once, the Owner did press Save, and guarding it would need a shared claim mechanism. Your save-then-answer order already avoids the worse case, a stale draft answering "Saved".

Checked and found sound

  • Model switch: the switch mark comes only from a person's commands in CommandAdmission, never from MCP or service paths, and selection changes re-check the provider and follow queued switches onto the assignment.
  • Turn source: steered, relayed and scheduled mentions count as the agent's pick.
  • Reviewer preference: it never blocks a launch, and unknown or native authors are handled.
  • Grants: each is spent once, by an atomic update. Grants for a different caller or persona are refused, and a provider that can't enforce the access is never waivable.
  • Owner buttons: both RPCs check Owner and settings-write scope.
  • Drafts: writes are digest-checked, folder files are untouched, and the trusted summary renders apart from the agent's text.
  • Seat replacement: the launch and swap are serialized, steps are checked under the lock, and stops and hand-offs are keyed for retries.
  • Older clients: at the base schema, decoding of the catalog, definition view and assignments still works.
  • FORK.md and D18: both cover the upstream composer and orchestrator edits in feat(j5): people can switch a persona worker's model #934.

Jackson's two product calls are in the comment above.

Posted by Claude Opus 5.5.

Jacksondr5 added a commit that referenced this pull request Nov 7, 2026
bryantderosier and others added 14 commits November 7, 2026 17:56
j5_read_persona reads a persona as Export YAML with its digest and origin.
j5_propose_persona validates a create or edit like Settings and stores a
draft. An ask with persona_draft_id carries the draft's trusted summary
(changed fields with an instruction line diff, or the full definition,
plus both override warnings for a folder persona). The Owner-only
j5.inbox.savePersonaDraft RPC saves it once, through editImported, a new
folder override, or createPersona, and answers the ask. Migration 054
adds the drafts table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allow this once becomes OwnerAskAction, which shows an ask's one Owner
action: Allow this once for an escalation, or Save persona for a draft,
in the Inbox and the Captain's dock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Inbox renders an ask as markdown, so the instruction diff and the
warnings ran together. The summary now uses paragraphs, a fenced diff
block for the instructions, and a fenced YAML block for a create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog entry carries overridesFolder for an imported copy over a
folder persona. Agent Setup shows "Overrides <folder>" instead of
"Personal", and its tooltip, or the line under the name on mobile, says
it hides the team version for everyone on this server and that Remove,
then Restore, brings it back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A drafted name or description with a line break is refused, and the
summary shows names, descriptions and models as inline code, so Markdown
in an agent's value can't style the part of the ask the Owner trusts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If the library write succeeded but marking the draft saved did not, the
retry saw a changed digest and said nothing was saved. It now recognizes
the persona already holding the draft's fields, marks the draft, and
answers the ask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A persona_draft_id ask now sets freshAsk, as an escalation ask does, so it
is refused before anything is written when the agent already has an ask
open with that person, instead of landing on an exchange that carries
another draft or an escalation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
J5's summary of a draft rides on personaDraft as data instead of being
appended to the agent's message, so the agent's markup can't hide, swallow
or imitate it. The web Inbox and dock show it with J5RecordPanel, and the
mobile Inbox as plain text under the ask, as the escalation record does.
The summary is plain text now: quoted values and indented blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #924 an ask to a person always opens its own exchange, so a draft ask
no longer needs freshAsk. Its record must still stay on the ask that opened
the Inbox item. j5_send_message refuses persona_draft_id on a regarding
follow-up to another ask, and authorizeAsk refuses a draft whose ask is still
open, naming that ask: follow up there, or clear it and ask again. On a
follow-up to the ask the draft already sits on, the id is dropped and the
follow-up goes. One check covers escalation_id and persona_draft_id. A
revised draft goes as a new ask. The tool description and docs say the same
in place of "fresh exchange".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The persona contract's section bodies drop their issue links and credits,
which move to its History lines. The user guide drops the provider and
access checks from switching a worker's model and the list of whose work an
independent reviewer reviews, keeping what the person does and sees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5 added a commit that referenced this pull request Nov 7, 2026
@Jacksondr5
Jacksondr5 force-pushed the feat/persona-edit-in-conversation branch from 5df3396 to eb0bbbc Compare November 7, 2026 23:19
@Jacksondr5

Copy link
Copy Markdown
Owner

Taking over the rebase onto #924 (Jackson's call, 2026-11-07). Bryant, thanks for the stack. Jackson asked us to finish the rebase so it can land before the upstream 0.1.7 build. All six layers are force-pushed onto j5/main 1e5b50c547. Your commits and authorship are kept, conflict hunks were resolved in place, and the new work is in separate commits on the layer it belongs to.

Layer Head
#931 cffd7b93fe
#932 c0d28ce5b6
#934 67d58e801b
#935 488c6974e6
#937 06f794de3f
#938 eb0bbbc1fd

Resolutions

  • Migrations: feat(j5): an agent can hold several open asks to a person, with explicit follow-ups #924 took 52, so CrewSeatReplacement, PersonaEscalations and PersonaDrafts are now 53, 54 and 55, in their layers.
  • Asks to a person follow feat(j5): an agent can hold several open asks to a person, with explicit follow-ups #924. Every ask to a person opens its own exchange, so freshAsk and A2AOpenAskExistsError are gone, and SendService is byte-identical to j5/main. The rule for a record id, escalation_id or persona_draft_id, now has three parts (625ec6c33a, 0f818d2617):
    • A new ask carrying an id that's still on an open ask is refused. The error names that ask, so J5's record and its button stay on the Inbox item that opened it. After that ask closes or is cleared, the id can go on a new ask.
    • A regarding follow-up to the ask the record is on drops the id and goes through.
    • A regarding follow-up carrying an id that is on another ask, or on none, is refused.
  • Inbox: the Recorded by J5 panel sits before feat(j5): an agent can hold several open asks to a person, with explicit follow-ups #924's follow-ups on the web dock, the web Inbox page and mobile.
  • Recorded summary (06f794de3f): it reads plainly, e.g. "Allow this once would let one launch use a model that Models for custom members doesn't allow", and names providers by their display names (Claude, Codex) instead of raw ids.
  • FORK.md and agent-tools.md: both sides are kept. The stack's new AC is now AC44, after docs(j5): the agent tools after linked environments #954's.
  • Jackson's docs asks (3bed262087, eb0bbbc1fd): the issue links in the agent-personas/index.md section bodies moved to History, the mechanics in personas.md were trimmed, and a stale "the mobile app has no Inbox yet" line was fixed.

Verification

  • Review: Claude Opus 5.5 (lead) and GPT-6.1-Sol reviewed every layer against your verified heads and feat(j5): an agent can hold several open asks to a person, with explicit follow-ups #924 over two rounds, and found nothing unresolved.

  • Checks: each layer contains the one below. Every touched package typechecks on every layer, and focused tests pass on every layer. vp run check:changed passes at the tip.

  • Live tests, by GPT-6.1-Sol (only Claude Haiku 5.5 and GPT-6 Luna ran turns):

    • On web: Allow this once, including a reasoning-level retry refused and a Crew seat allowed from the Inbox; several open asks; Save persona; Replaced by; and the record-binding rule.
    • On Android: the Inbox.
    • On iOS, on Jackson's iPhone, driven by his iPhone Testing agent: the Inbox panels, a person's model switch, and the Independent reviewer switch.

    Reports: artifacts/test-reports/persona-rebase/4e5ce6b183.md and eb0bbbc1fd.md.

Mobile follow-ups from the iOS pass are in #962, #836 and #967. They wait for 0.1.7. Jackson's docs and UI sign-off stands, and I'll merge the stack once CI is green.

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approved for the whole stack (#931 → #938) at eb0bbbc1fd, on j5/main 1e5b50c547. Claude Opus 5.5 (lead) and GPT-6.1-Sol reviewed it with nothing unresolved, and GPT-6.1-Sol live-tested it on web, Android and Jackson's iPhone. Jackson signed off the docs and UI. Merging once CI is green.

@Jacksondr5
Jacksondr5 merged commit 49bd690 into j5/main Nov 8, 2026
57 of 69 checks passed
@Jacksondr5
Jacksondr5 deleted the feat/persona-edit-in-conversation branch November 8, 2026 02:15

This branch was successfully deployed

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

Labels

enhancement New feature or request size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personas: edit personas in conversation

3 participants