Skip to content

feat(agents): invoke saved agents from shared prompt mentions - #118

Merged
Jacksondr5 merged 10 commits into
feature/agent-persona-settingsfrom
feature/agent-subagent-invocation
Sep 14, 2026
Merged

Jacksondr5 merged 10 commits into
feature/agent-persona-settingsfrom
feature/agent-subagent-invocation

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Changed

Adds a shared @agent:<id> picker for Codex and Claude. Saved agents run as subagents under the current conversation with their own immutable instructions, model route, reasoning, and runtime policy. Completion returns to the parent; crews remain out of scope.

The web/desktop and mobile composers reuse their existing menus. J5 modules own lookup and invocation; FORK.md records the small upstream integration hooks.

Why

Imported agents could be managed in Settings but could not be invoked consistently from prompts. The new picker connects the saved definitions to the existing child lifecycle without changing provider adapters or adding a second task engine.

Validation

  • 131 focused invocation, composer, contract-boundary, and MCP registration tests pass across 14 files.
  • Server, web, and client-runtime typechecks pass. Mobile has 62 existing navigation type errors, identical to the base comparison.
  • Browser verification confirms agent suggestions and identical editable mention syntax in Codex and Claude. Backend integration verifies one nested child, saved assignment, and retry idempotency.
  • Live provider completion remains unverified: Claude was signed out and the isolated Codex environment failed its CLI identity check.
  • git diff --check passes.

UI Changes

Before/after screenshots were captured locally. Upload is deferred at Bryant’s request; no PR-only images are committed.

Checklist

  • Changes implement saved-agent invocation with focused commits
  • Behavior and fork boundaries are documented
  • Focused tests and scoped typechecks completed
  • Before/after evidence uploaded (deferred at Bryant’s request)

Merge order

This PR extends GitHub stack pingdotgg#120 and depends on #85. Merge bottom to top:

#75 → #76 → #78 → #79 → #80 → #81 → #83 → #82 → #85 → #118

The Claude sign-in verification that briefly lived here was reverted on 2026-09-09; Bryant is upstreaming it to pingdotgg/t3code separately.

Stack rebuilt 2026-09-09 (stack pingdotgg#120): #84 and #86 were dropped, and fork-boundary refactors moved the persona RPCs, guards, and client wiring into J5-owned files. Review threads were preserved.

Implemented with GPT-6 using the Codex desktop app.

Also on 2026-09-10 (roadmap items 3 and 6): new-task drafts on web and mobile offer an Agent control that starts the task as a saved agent (the launch carries the agent request; the server pins the route), and agent identity now shows on thread rows in both thread lists and on delegated children in the Agents panel. Draft selection is session-local J5 state; upstream composers gain one hook call and two mounts each, recorded in FORK.md.

Rebased on 2026-09-10 onto #85's usage, library sources, and copy-to-environment work. The same push fixes the one failing web unit test on this branch: the identity label gained min-w-0 for flex truncation and ThreadCardIdentity.test.tsx still asserted the old class string.

Stack rebased onto j5/main at 4f95ee26b on 2026-09-11 after #109 landed. The only conflict was the sorted MCP tool list in registration.test.ts, where this PR adds invoke_agent and #109 adds list_artifacts; both are kept.

@bryantderosier
bryantderosier added this pull request to stack #89 September 9, 2026 00:49
@github-actions github-actions Bot added size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 9, 2026
@bryantderosier bryantderosier self-assigned this Sep 9, 2026
@bryantderosier
bryantderosier marked this pull request as ready for review September 9, 2026 11:16
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch from cb1d249 to 5817f3a Compare September 9, 2026 12:52
@bryantderosier
bryantderosier removed this pull request from stack #89 September 9, 2026 13:01
@bryantderosier
bryantderosier changed the base branch from feature/agent-runtime-ui-polish to feature/agent-persona-settings September 9, 2026 13:01
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch 2 times, most recently from 43ac59a to c457a76 Compare September 9, 2026 15:16
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch from c457a76 to ec81801 Compare September 9, 2026 15:58
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch 5 times, most recently from 13cafb1 to 0cae76b Compare September 11, 2026 01:46
@github-actions github-actions Bot added size:XL 500-999 effective changed lines (test files excluded in mixed PRs). and removed size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Sep 11, 2026
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch from 37bf864 to c2fd0aa Compare September 11, 2026 02:31
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch 2 times, most recently from d9a27df to 98a18f6 Compare September 11, 2026 18:19
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch from 98a18f6 to d9a27df Compare September 11, 2026 18:22
bryantderosier and others added 10 commits September 14, 2026 08:06
…trigger

Agents no longer merge into @path results on web or mobile, which removes the
list-merging, pending-state, and empty-text edits from the upstream composers.
The picker hooks read the catalog through the J5 persona atoms.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This reverts commit 0653568347b7484aebce4a4b7c2260fd1979040d.
…rd set

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The shared mention module owns the replacement text and client-runtime
owns the selection routine, so the web composer's agent branch is one call
and the mobile hook reuses the same text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
New-task drafts on web and mobile offer an Agent control beside the model
picker. Choosing one replaces the model and reasoning controls with the
agent's name and fixed route until the first send, when the launch carries
the agent request and the server pins the resolved assignment. Thread rows
in both thread lists show the agent beside the thread's home, and delegated
children in the Agents panel show which saved agent ran them via the child
thread's shell. Draft selection is session-local J5 state; the upstream
composers gain one hook call and two mounts each.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The saved-agent identity commit added min-w-0 to the truncated Squadron label so
it shrinks inside flex rows, but the sidebar truncation test still asserted the
old class string. Update the assertion; behavior is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bryantderosier
bryantderosier force-pushed the feature/agent-subagent-invocation branch from d9a27df to 66946b5 Compare September 14, 2026 12:08
@Jacksondr5
Jacksondr5 merged commit 2f4457d into j5/main Sep 14, 2026
20 checks passed
@Jacksondr5
Jacksondr5 deleted the feature/agent-subagent-invocation branch September 14, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 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.

2 participants