Skip to content

Evaluate J5's agent tools against upstream's: keep, converge, retire or give back #519

Closed

Description

@Jacksondr5

Why

J5 built its own agent tools when upstream's were more primitive, and hides upstream's equivalents (register D2 in docs/j5/product/upstream.md). D2 already says this should be revisited: "Upstream's tools keep evolving, so J5 should periodically re-evaluate them and consider merging its tools with upstream's rather than carrying parallel versions." Nobody has done that evaluation, and no issue tracked it.

Upstream has moved a long way since (pin 29980a3140, 2026-10-08): thread tools reach any thread in the environment under a declared access model (McpToolAccess), a real Stop that holds the queue and cascades to delegated work, a launch tool with workspace strategies and a scratch project, sender identity on agent sends, t3-thread:// links, PR watches, and sign-in for outside agents. Some of J5's tools now overlap upstream's closely. Raised by Jackson on 2026-10-10 while deciding #508: "sending messages seems to have a bit of overlap."

The overlap, as a starting point

This table is from memory of the #500 review, not a row-by-row verification. Checking each row against the code is the first step of the evaluation.

J5 tool Upstream's nearest What J5 adds on top Upstream tool's status in J5
send_message t3_thread_send The ledger: participants, asks and replies (Exchanges), obligations, silence notices, delivery receipts and alarms, the envelope, cards in the timeline, queue behind a running turn (D4), machine and peer-server senders Hidden
spawn_agent t3_thread_launch, create_threads Placement and provenance (who spawned whom), the first-turn brief contract, J5's workspace choice Hidden
stop_agent, stop_crew t3_thread_interrupt, upstream's thread.stop, task_cancel Addressing by participant, Crew-wide stop. Since #500 they send upstream's Stop underneath t3_thread_interrupt hidden; task_cancel admitted
list_participants t3_thread_list, t3_thread_search, t3_project_list Participant ids, what each accepts, provenance, peer-server rows, people and machines Admitted beside it
archive_crew t3_thread_organize Retires a Crew as a unit Admitted, re-declared with the Crew-seat guard
t3_thread_fork, t3_thread_organize, t3_thread_send_attachments (re-declared) The same tools Placement errors, the seat guard, delivery through the ledger Upstream's names, J5's descriptions or handlers
delegate_task (re-declared) delegate_task Running a saved persona as a child Admitted; whether it stays is #336
(withdrawn) t3_thread_wait Nothing: J5 removed it because a turn that blocks cannot receive platform notices Absent
propose_crew, request_crew_member, clear_own_ask, list_personas, the playbook tools None J5-only features n/a
Artifact tools To be confirmed: upstream's toolkit list contains the same names Project-level storage outside the repository To be confirmed in #508

What to decide, per tool

  1. What does J5's tool do that upstream's does not, today? Verify against the code at the current pin, not against what was true when J5's tool was written.
  2. Does the difference still matter to J5? A difference that exists only because upstream lacked something it now has is not a reason to keep a parallel tool.
  3. Which outcome:
    • Keep as a separate tool, with the reason written into D2.
    • Converge: J5's behavior becomes a layer on upstream's tool (for example the ledger observing upstream's send rather than replacing it), so agents see one tool.
    • Retire J5's tool and admit upstream's.
    • Give back: offer the J5 behavior upstream (Upstream give-back backlog (hold until V2 merges upstream) #276) so the parallel version can go later.
  4. What it costs each way: upstream edits to carry, what agents have to learn, what breaks in stored history, what the person sees in the timeline and Inbox.

The send pair is the one to start with. It carries the most J5 machinery, and it is where the question "could the ledger sit under upstream's send?" has the biggest payoff or the clearest no.

Related

Activity

  1. Jacksondr5 commented on Oct 12, 2026

    @Jacksondr5
    OwnerAuthor

    Decisions (Jackson, 2026-10-11)

    Worked through row by row with Jackson. Each row was checked against the code at pin 29980a3140. Nothing is built yet; the build follows this list.

    What the check found

    • Three of the overlapping rows already run on upstream's engine. j5_send_message delivers through upstream's sendToThread, j5_stop_agent and Crew stop dispatch upstream's thread.stop, and a spawn's new worktree is prepared by upstream's ThreadLaunch. What stays parallel is the tool the agent sees.
    • Upstream's t3_thread_interrupt is weaker than J5's stop: it interrupts the running turn and the next queued turn starts. Upstream has no agent tool that sends its full Stop to an arbitrary thread.
    • The artifact tools are J5's own (FORK.md case 33). They have no upstream twin.
    • "Hidden" means upstream's code stays exactly as upstream wrote it and J5's registration does not select the tool. Nothing is deleted.

    Send: keep j5_send_message

    • Add an optional mode: queue (the default), steer or restart, with upstream's meanings. Upstream's auto is not brought in, because it steers whenever it can and brings back the harm D4 records.
    • steer or restart to an idle agent starts a normal turn.
    • steer and restart get upstream's permission rule: the target can't have broader permissions than the sender. A plain queued send has no check.
    • Remote steering to a peer server is included. The mode and the sending agent's permission mode travel in the peer delivery body as optional fields, the receiving server applies the rule and refuses through the existing refusal notice, and a peer capability says whether a server understands the mode.
    • Add attachments to j5_send_message, and stop registering J5's version of t3_thread_send_attachments. Attachments to an agent on a peer server stay refused.
    • Revisit queue as the default on or after 2027-01-11: Revisit queue as the default landing for agent messages (due 2027-01-11) #538.

    Stop: keep j5_stop_agent and j5_stop_crew

    • t3_thread_interrupt stays hidden.
    • Remove the same-project limit on j5_stop_agent: it reaches any agent on this server the caller can address.
    • Add upstream's permission rule to j5_stop_agent. A Captain stopping its own Crew is exempt.

    Spawn: keep j5_spawn_agent

    t3_thread_launch and create_threads stay hidden. Crews and repeated spawns cover bulk creation. Brought in from upstream's launch:

    • An optional project for every caller, defaulting to the caller's own.
    • A no-project form, which is a thread in upstream's "No project" project with a folder of its own.
    • A choice of the new agent's permission and interaction modes, capped at the caller's, as upstream caps it. A persona's own policy still applies without a cap when an agent inside J5 spawns it.
    • Attachments on the brief.
    • The project root as a workspace choice. "Your own checkout" is refused when the target is another project.
    • Calls from outside agents come with Outside agents (MCP OAuth clients) need a ledger identity to message and start threads #498, which builds on top of this. Until then they stay refused. Jackson decided that an outside agent is capped at its approved level in every case, personas included.

    To check while building: a retried spawn from a caller with narrower permissions must not land on an agent first created with broader ones (the hole found in review of pingdotgg#16654), and whether J5's retry keys survive a server restart (pingdotgg#16184).

    List: keep j5_list_participants, and bound it

    It returned every participant on the server in one answer, 152 unarchived on the live install. It now follows upstream's listing pattern:

    • One project per call, the caller's own when project_id is omitted.
    • cursor and limit (default 50, maximum 100), with next_cursor and total in the result.
    • Filters: name_contains, and a three-way settled. include_archived stays.
    • People appear in every listing. Agents on a peer server are listed by naming the server in an optional server field.

    t3_thread_list, t3_thread_search and t3_project_list stay admitted beside it. They answer what threads exist and their state; this answers who can be addressed.

    Tools J5 registers under upstream's names

    The rule: a tool gets a J5 name when J5 changes what it takes, returns or means. It keeps upstream's name when J5 only adds a refusal or an error message.

    Tools J5 hid without replacing

    Build order

    This issue's changes land first, and #498 builds on top of them.

    Docs to rewrite with the build

    Register D2 and D4 in docs/j5/product/upstream.md, the messaging and launch entries of docs/j5/product/upstream-convergence.md, and FORK.md's tool cases.

  2. Jacksondr5 commented on Oct 12, 2026

    @Jacksondr5
    OwnerAuthor

    Build status (2026-10-12)

    Everything in the decision record above is built, in a stack of three PRs. None is merged; Jackson is holding merges until his live-testing work lands.

    PR What it carries
    #553 The bounded j5_list_participants; j5_stop_agent's reach and permission rule; mode and attachments on j5_send_message; the three admitted upstream tools
    #557 j5_spawn_agent: another project, no project, the permission choice, attachments, the root workspace
    #563 A steer or restart to an agent on a peer server

    One ruling since the record. While building, I found two earlier rulings that say permissions do not gate stop, steer and restart between Peer Agents (Bryant, 2026-09-14; Jackson, 2026-09-16). Jackson confirmed on 2026-10-12 that the 2026-10-11 decision stands: J5 follows upstream's rule, because he does not want a divergence on permissions in general. The tool definition records it as a reversal of the 2026-09-14 rule for j5_stop_agent.

    Still to do before merge: the live test of the stack, including two peered servers, and a screenshot of an agent spawned into another project at the sidebar's top level (#557).

    Follow-ups filed: #538 (revisit queue as the default landing, due 2027-01-11), #552 (what deleting a project does to J5's state, then admit t3_project_delete).

    #498 (outside agents) builds on #557 as #560.

  3. 5 remaining items

  4. Jacksondr5 commented on Oct 12, 2026

    @Jacksondr5
    OwnerAuthor

    delegate_task: keep, as it is (Jackson, 2026-10-12)

    The one row of the table that had been left to #336 without a ruling. Checked against the code at the current head.

    What upstream's delegate_task creates. A subagent of the calling thread, not a peer:

    • The child thread's lineage is relationshipToParent: "subagent", and it is recorded as a task under the parent's running turn (dispatchDelegatedTaskRequest in apps/server/src/orchestration-v2/Orchestrator.ts, makeSubagentChildThread in SubagentProjection.ts).
    • It copies the parent's project, checkout and branch. There is no workspace choice.
    • It gets only the task prompt, and its result returns to the parent: the call blocks (mode: "wait") or the parent is woken when the child ends (mode: "async").
    • It is refused unless the caller owns an active run.
    • The sidebar hides it, and J5's ledger never registers a subagent-lineage thread, so it cannot be listed or messaged.

    Since the early V2 branch it has gained wait-or-async, a wake on completion, a retry key, another provider or model as the target, a permission choice capped at the parent's, and a real stop through task_cancel. All of that made it a better subagent tool. None of it moves it toward a Peer Agent.

    So it does not overlap j5_spawn_agent. The upstream tool that spawns the way J5 does is t3_thread_launch, which stays hidden and whose features j5_spawn_agent took in #557.

    What J5 adds. The optional persona, which runs the child as a saved persona, and a description that leads with it and sends ordinary subagent work to the provider's own subagent tool. Without persona, J5's version calls upstream's code unchanged.

    Ruling. Keep: upstream's tool under upstream's name, with J5's one addition, and nothing to converge. Its overlap is with the provider's native subagents, which is the question #336 holds.

    Not verified: whether a person can open a delegated child in the app and type into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions