feat(plugins): handoffs leave the core for the Handoff plugin #7
Closed
gabrielvidal
wants to merge 0 commits from
handoff-plugin into main
pull from: handoff-plugin
merge into: gabrielvidal:main
gabrielvidal:main
gabrielvidal:pi-steer
gabrielvidal:card-icon-beside-title
gabrielvidal:worktrees-cli
gabrielvidal:worktrees-plugin
gabrielvidal:agent-presets
gabrielvidal:no-plugin-white-flash
gabrielvidal:agy-tasks
gabrielvidal:home-declutter
gabrielvidal:perf-plugin-batching
gabrielvidal:fresh-context-plugin
gabrielvidal:remove-hooks-page
gabrielvidal:palette-plugins
gabrielvidal:linear-projects
gabrielvidal:agent-messaging
gabrielvidal:model-router
gabrielvidal:conv-card-layout
gabrielvidal:ask-more-options
gabrielvidal:agent-limits
gabrielvidal:generic-ui-strings
gabrielvidal:android-push-bridge
gabrielvidal:auto-translate
gabrielvidal:filter-chips
gabrielvidal:plugin-catalog
gabrielvidal:file-viewers
gabrielvidal:plugins-page-rework
gabrielvidal:hub-mcp-plugin
gabrielvidal:translation-plugin
gabrielvidal:scheduled-doors
gabrielvidal:cron-jobs-plugin
gabrielvidal:context-skills-plugin
gabrielvidal:files-plugins
gabrielvidal:worker-names
gabrielvidal:details-panel-perf
gabrielvidal:services-plugin-only
gabrielvidal:fix-test-env-leaks
gabrielvidal:bg-shells-plugin
gabrielvidal:feat-commits-plugins
gabrielvidal:fix-branch-line-tag-rows
gabrielvidal:retire-dead-leftovers
gabrielvidal:runner-into-harness-pi
gabrielvidal:retire-tool-proxy
gabrielvidal:new-project-policy-plugin-only
gabrielvidal:guest-jobs-sonnet
gabrielvidal:push-buttons-everywhere
gabrielvidal:mail-send-plugin
gabrielvidal:ui-polish-batch
gabrielvidal:command-palette-plugin
gabrielvidal:keyboard-shortcuts-plugin
gabrielvidal:prompt-shortcuts-plugin
gabrielvidal:matomo-site-grants
gabrielvidal:lab-chrome-plugin
gabrielvidal:performance-plugin
gabrielvidal:whats-new-plugin
gabrielvidal:skills-agents-plugin
gabrielvidal:goals-plugin-only
gabrielvidal:storage-server-side
gabrielvidal:plugin-scheduled-conversations
gabrielvidal:plugin-fences
gabrielvidal:plugin-commands
gabrielvidal:plugin-speed
gabrielvidal:cleanup-provider-harness
gabrielvidal:plugin-conversation-labels
gabrielvidal:plugin-plan-usage
gabrielvidal:fix-worker-harness-sync
gabrielvidal:plugin-gcloud-reauth
gabrielvidal:feat/plugin-cards-in-thread
gabrielvidal:feat/plugin-proxy-wake
gabrielvidal:unify-subagents-children
gabrielvidal:wave3d-frontend-typed-plugins
gabrielvidal:wave3c-sidecar-strict-plugins
gabrielvidal:wave3a-catalog-accounts-profiles
gabrielvidal:wave3b-pricing-usage-cutover
gabrielvidal:wave1a-typed-plugins
gabrielvidal:wave1b-sidecar-runtime
gabrielvidal:fix-ios-overlay-scroll
gabrielvidal:batch2-work-resources-core
gabrielvidal:batch2-apikeys
gabrielvidal:plugin-blue-green-deploy
gabrielvidal:plugin-ship
gabrielvidal:plugin-project-env
gabrielvidal:plugin-memories
gabrielvidal:plugin-activity
gabrielvidal:plugin-templates
gabrielvidal:plugin-desk-phone
gabrielvidal:batch1-platform
gabrielvidal:plugins-list-view
gabrielvidal:dash-plugins
gabrielvidal:pets-plugin
gabrielvidal:ha-push-channel
gabrielvidal:mail-agents
gabrielvidal:graph-fix
gabrielvidal:graph-plugin
gabrielvidal:services-plugin
gabrielvidal:left-to-do-plugin
gabrielvidal:plugins-gallery
gabrielvidal:home-conv-menu
gabrielvidal:meta-business
gabrielvidal:agy-rdrand
gabrielvidal:bg-lag
gabrielvidal:conv-load-perf
gabrielvidal:askform-instant
gabrielvidal:fix/drawer-menu-done-chip
gabrielvidal:pi-midrun-compaction
gabrielvidal:interrupt-menu-btn
gabrielvidal:authz
gabrielvidal:inkling
gabrielvidal:repo-plugins
gabrielvidal:work-sync
gabrielvidal:leftovers
gabrielvidal:fix/agy-guest-guard
gabrielvidal:feat/model-presets
gabrielvidal:scroll-back
gabrielvidal:feedback-bell
gabrielvidal:feat/movies-tool
gabrielvidal:feat/running-thread-padding
gabrielvidal:feat/drawer-filter-button-card-chat
gabrielvidal:burn-rate
gabrielvidal:guest-install
gabrielvidal:guest-usage
gabrielvidal:guest-palette
gabrielvidal:guest-form-links
gabrielvidal:form-open-buttons
gabrielvidal:clarifier-lean
gabrielvidal:auto-archive
gabrielvidal:guests-profile
gabrielvidal:conv-motion
gabrielvidal:share-target
gabrielvidal:terminal-sync
gabrielvidal:work-context-past
gabrielvidal:work-context-brief
gabrielvidal:enroll-codes
gabrielvidal:open-image-file
gabrielvidal:worker-uploads
gabrielvidal:conv-drawer-search
gabrielvidal:stack-motion-v3
gabrielvidal:notif-stack-fixes
gabrielvidal:home-motion
gabrielvidal:i18n-fr
gabrielvidal:local-electricity-cost
gabrielvidal:cache-pill-thread
gabrielvidal:cache-scenarios
gabrielvidal:fresh-start
gabrielvidal:msg-select
gabrielvidal:shortcuts-setup
gabrielvidal:ui-0-40-3
gabrielvidal:outbox-landing
gabrielvidal:resume-scope
gabrielvidal:conv-filter-range
gabrielvidal:fix-subagent-form-session
gabrielvidal:ask-form-integration
gabrielvidal:form-visual-options
gabrielvidal:watcher-perf
gabrielvidal:last-msg-summary
gabrielvidal:secret-fields
gabrielvidal:commit-review
gabrielvidal:summary-mode-fixes
gabrielvidal:service-tag-parser
gabrielvidal:clarifier
gabrielvidal:fetch-diet-2
gabrielvidal:fetch-diet
gabrielvidal:conv-look
gabrielvidal:pwa-links
gabrielvidal:tool-widgets
gabrielvidal:worker-autoupdate
gabrielvidal:usage-rings
gabrielvidal:opencode-harness
gabrielvidal:notif-diet
gabrielvidal:conv-resources
gabrielvidal:scheduled-tasks
gabrielvidal:profiles
gabrielvidal:notify-exact-cost
gabrielvidal:usage-measuring
gabrielvidal:guest-projects
gabrielvidal:usage-calibration
gabrielvidal:account-switch
gabrielvidal:multiuser-improve
gabrielvidal:form-groups
gabrielvidal:multiuser
gabrielvidal:motion-reel
gabrielvidal:dashboards-fixes
gabrielvidal:split-big-files
gabrielvidal:held-regex
gabrielvidal:subagent-interrupts
gabrielvidal:form-html
gabrielvidal:tokunia-video
gabrielvidal:settings-uniform
gabrielvidal:worker-ask-fix
gabrielvidal:worker-generic-mac
gabrielvidal:runner-shortcuts
gabrielvidal:notify-unify
gabrielvidal:perf-list-cache
gabrielvidal:mac-worker
gabrielvidal:model-switch
gabrielvidal:pipeline-paths
gabrielvidal:multi-account
gabrielvidal:feature-flags
gabrielvidal:qwen38-support
gabrielvidal:url-prompt
gabrielvidal:running-pages
gabrielvidal:homelab-tag
gabrielvidal:root-project
gabrielvidal:or-models
gabrielvidal:deploying-loader
gabrielvidal:worktree-diff
gabrielvidal:conv-tags
gabrielvidal:tags-page
gabrielvidal:agents-page
gabrielvidal:icon-picker-shortcuts
gabrielvidal:conv-cta
gabrielvidal:stamp-refine
gabrielvidal:post-task-cache
gabrielvidal:post-tidy-completed
gabrielvidal:form-badge
gabrielvidal:hooks-delay-seconds
gabrielvidal:cost-dashboard
gabrielvidal:plan-forms
gabrielvidal:form-mobile
gabrielvidal:guidelines-dag
gabrielvidal:skills-view
gabrielvidal:navbar-hold
gabrielvidal:spawnbox-status
gabrielvidal:hold-editable-expand
gabrielvidal:drawer-transparent
gabrielvidal:hold-fix
gabrielvidal:hold-editable
gabrielvidal:charroll-bump
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
gabrielvidal (Gabriel Vidal)
Clear assignees
No Assignees
gabrielvidal
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gabrielvidal/ai-agent#7
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Handoffs (continue a conversation in a new one on another model, harness or machine) leave the core for the new Handoff live plugin (
ai-agent-plugins→plugins/handoff, its own PR). The core forgets handoffs entirely, link included (Gabriel's picks in formhandoff-plugin-move_ryvcho: scope B, menu B, dialog A, banners A, skill B). What the core gains in exchange is generic: plugin rows in the conversation menu that open a plugin dialog, two thread slot places, and a bridge for a plugin's own data on a conversation.Companion PRs: the plugin — gabrielvidal/ai-agent-plugins#1 · the homelab skill copy deleted — gabrielvidal/homelab#17.
Key changes
ui.menuItems[](plugins/manifest.py_menu_items,plugins/routes.py):{id, where: "conversation.menu", label, icon?, html, height?, title?}, ≤ 8, only written when set (approval fingerprint unchanged for every other plugin). Served in/api/plugins/uiand atGET /api/plugins/{pid}/ui/menuItem/{id}.ConversationMenu.tsx, newbusiness/plugins/components/PluginMenuItems.tsx): Hand off ▸ and its model rows are gone; each active plugin's item is a row that opens its sandboxed frame in a Modal, init{conversationId, sessionId, title, harness, worker, running, archived}.PluginSandboxFrame.tsx):aiAgentPlugin.close()(closes the dialog it is in) andaiAgentPlugin.toast(message, tone)(provider-safe, likeResourceTags).conversation.threadHeader(first line, under the fork banner) andconversation.threadEnd(last line, after the summary):ThreadPluginSlotsfeeds each slot{sessionId, conversationId, running, pluginData}, wherepluginDatais that plugin's ownmeta.plugins.<id>.ConversationDetail.pluginData(owner only) and the newconversations.datacapability (plugins/hubconvdata.py):GET|POST …/hub/conversations/{sid}/data, plugin handlers only, owner only, operator approval, ≤ 16 KB, merge or replace, SSEmetaafter a write.runs.starttakestest: true;hub/conversationsrows carrymodelandharness.carryover.handoffs: the oldmeta.handoffFrom/handoffTostamps (2026-11-24 → 26) are copied intometa.plugins.handoff.from/.toat start, so past handoffs keep their banners.runs/handoff.py,POST /api/handoff(+ authz row, golden matrix, fr string),SpawnBody.handoffFromand the spawn'shandofforigin,meta.handoffFrom/handoffToin cards,handoff*Conversationinspawned.links, theHandoff*schemas and generated models,Handoff.tsx+ test, the Handoffs eye switch (the plugin's ownvisswitch replaces it), 16 unused fr strings.ai-agent new --handoff-fromand MCPstart_conversation.handoff_fromremoved, with their tests; the plugin's commands replace them.docs/plugins.md→ "Menu items, thread places and conversation data", the capability table;CLAUDE.md→ "Handoffs" rewritten.Key decisions
conversations.data, instead of the core keeping ahandoffFromspawn field. The bridge, menu items and thread places know nothing about handoffs, so any plugin can use them.update, not through a handler read: a conversation with no handoff costs no subprocess (the slot folds withresize(0)); only the Continued in banner peeks (once synced) for the successor's id and title.conversations.datais handler-only: the owner's run token can't write it directly; the plugin'slinkaction holds the rules (both ends, ownership, shapes).commands(the mechanism of299c27e7, conversation 9a264493):ai-agent new --handoff-fromand MCPstart_conversation.handoff_fromare removed. The plugin declaresai-agent plugin handoff start|link|links|modelsand the MCP toolsplugin_handoff_start/_link/_linksitself. A worker-bound MCP connection gets no plugin tools, so on a Mac the skill'shandoff linkcalls the plugin's action throughhub.json, where an owner's worker token is the owner.meta.origin == "handoff"for the old runs, without reading any handoff meta.Changelog
ai-agent new --handoff-fromand the MCPhandoff_fromargument — useai-agent plugin handoff start|link(MCPplugin_handoff_start/plugin_handoff_link).Test notes
main299c27e7(plugin commands). CLI:test_ai_agent.py+test_mcp_tools.py75 passed. The plugin's commands were driven through this branch'sai-agent plugin handoff …against the real backend:commandslists the four with their MCP tool names,linksresolves the successor once synced,models,startreaches the run bridge, a bad--modeis refused, andnew --handoff-fromis now an unknown flag. After the rebase,test_plugin_conv_data,test_plugins,test_authz_matrix,test_plugin_widget_platform,test_plugin_hubrunsandtest_plugin_commandsall pass; the re-dumped spec and generated types are unchanged;tscis clean./dataon tmpfs (asscripts/test.py): newtest_plugin_conv_data.py(12 passed).test_authz_matrix,test_authz,test_telemetry,test_plugin_hubruns,test_plugin_widget_platform,test_plugins,test_children,test_spawned_live,test_plugin_conversations,test_continued_in,test_conv_uid_routes,test_batch1_platform,test_stage2_platform,test_plugin_gapsandtest_typed_pluginseach pass the same as onmain, one module per process.tsc --noEmitclean; vitest 1 035 passed + the newPluginMenuItems.test.tsx(3). The 3 failures are pre-existing:FreshContextis on the known-flaky list, and the 2useShareTargettests fail identically onmainon the EVOX2 (object.stream is not a function).linkstamping both ends,pluginDatain the source's detail,peek(synced / not yet),models(with vendors), warm →conversations.sendand cold →runs.startreached (a clean 503: no sidecar on the devbox), a bad mode → 400. All passed.dev-up --distover that backend (dark): the menu row, the dialog, Continued in, Continued from.ai-agent plugin install ~/projects/ai-agent-plugins/plugins/handoff --approve, operator capabilitiesconversations.send,runs.start,models.read,conversations.data), deploy this PR (ai-agent-deploy), then merge the homelab PR. Between the core deploy and the plugin install there is no Hand off menu, and no banners.🤖 Generated with Claude Code
Screenshots
The handoff link, the conversation menu's Hand off ▸, HandoffDialog, the Continued from / Continued in banners and POST /api/handoff move to the handoff live plugin (ai-agent-plugins). What the core keeps is generic: - ui.menuItems (conversation.menu): a plugin row in the conversation menu opening the plugin's sandboxed dialog; frame bridges close() and toast() - slot places conversation.threadHeader / conversation.threadEnd, whose update carries the plugin's own meta.plugins.<id> (pluginData) - ConversationDetail.pluginData (owner only) - conversations.data: GET|POST hub/conversations/{sid}/data, a plugin's own data on a conversation (handler only, owner only, operator approval) - runs.start takes test; hub/conversations rows carry model and harness - carryover.handoffs moves the old meta.handoffFrom / handoffTo stamps into meta.plugins.handoff once Removed: runs/handoff.py, /api/handoff, SpawnBody.handoffFrom and the spawn's handoff origin, meta.handoffFrom/handoffTo and their resolved refs, Handoff.tsx, the Handoffs eye switch (the plugin's vis switch replaces it). The CLI's --handoff-from and MCP handoff_from are left alone (inert) until the CLI/MCP plugin-commands mechanism lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>9b12362c79tof038c4fa20Merged into
mainas4e90149b(batch merge of the EVOX2 conversations, all ai-agent suites green) and deployed: ai-agent @e1b7b4ablive since 2026-11-26 23:41.Pull request closed