Skip to content

feat(claude-code): bundle the Claude Code agent type by default - #818

Merged
baxen merged 2 commits into
mainfrom
art/bundle-claude-code
Oct 9, 2026
Merged

baxen merged 2 commits into
mainfrom
art/bundle-claude-code

Conversation

@baxen

@baxen baxen commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Ships the Claude Code agent type with the app, so it's on by default instead of needing pnpm plugin:claude-code plus Load from folder.

  • Moves src/agent-plugins/claude-code → src/bundled/claude-code (same directory depth, so relative imports don't change).
  • Adds it to both bundled lists: src/bundled/index.ts (web/JS) and bundled_manifests() + enabled_by_default in crates/plugin-manager/src/lib.rs (desktop catalog). native_catalog_matches_desktop_bundles keeps the two in sync.
  • Mac/Linux desktop only: apply returns early unless isTauri() and the platform is Mac or Linux, the same gate the terminal plugin uses. The browser host can't start processes, and setup and file uploads run bash and base64, which stock Windows lacks.
  • The tabs (tabs.tsx) use the shared Button, Field, Input, Select and Textarea now that they can import app components, so pending Install/Sign in/Save keep keyboard focus and help text is attached to its control.
  • Removes vite.claude-code.config.ts and the plugin:claude-code script.

The id stays buzz.claude-code, so existing agents (typed buzz.claude-code/claude-code) carry over. Bundled plugins already get pluginOwner with revision bundled, and host_grants reads the bundled manifest's processes, so host.spawn works without any change.

Upgrade: a profile that folder-loaded buzz.claude-code upgrades in place. The registry's read() drops that installed entry, and if it was disabled the bundled copy starts off. Every other installed entry with a bundled id still fails with "Invalid installed plugin identity".

Validation: full vitest run 643 files / 8999 tests pass (claude-code 48/48, including Windows/browser registration and focus during pending, failed-save retry and cancel), tsc --noEmit, biome check, design:check, cargo clippy and cargo test -p buzzodz-plugins (including an upgrade test for an old installed entry and the catalog parity test). Not yet run: a native desktop session starting a Claude Code agent from the bundled copy.

🤖 Generated with Claude Code

@baxen
baxen marked this pull request as ready for review October 9, 2026 18:45
@baxen
baxen requested a review from a team as a code owner October 9, 2026 18:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T18:49:37.122207Z b3a96d2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3a96d201b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/bundled/claude-code/index.ts Outdated
@@ -13,6 +13,8 @@ const HANDOVER_MS = 2 * 60_000;

export const inject = ["react", "agents2", "host", "relay"];
export const apply: PluginModule["apply"] = (ctx) => {
// Only the desktop app can start `claude`; no unusable type in a browser.
if (!isTauri()) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the bundled agent off unsupported Windows hosts

On Windows desktop, isTauri() is true, so this registers and advertises the agent type even though its manifest starts the installer with bash and reads files with base64; the native host executes these programs directly, and standard Windows installations provide neither. A Windows user without Claude therefore gets an Install action that fails with Could not start bash, while a preinstalled Claude can still fail when a tool reads a file. Either restrict registration to the supported desktop platforms or provide Windows-native process declarations and validation.

AGENTS.md reference: AGENTS.md:L81-L85

Useful? React with 👍 / 👎.

Comment thread src/bundled/index.ts
Comment on lines +183 to +185
manifest: { ...claudeCodeManifest, apiVersion: 1 },
module: claudeCode,
enabledByDefault: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Adopt shared controls before enabling the bundled plugin

Registering this as a source-bundled plugin leaves tabs.ts using its former external-plugin workaround: it hand-builds Button/Field substitutes and styles native selects as buzz-input, despite DESIGN.md requiring source plugins to import the shared controls and finite choices to use Select. This bypasses shared behavior such as Button's focusable loading state and spinner, Field's description/error wiring, and the Base UI Select keyboard/popup contract—for example, starting Install or Save disables the focused hand-built button instead of preserving the shared pending interaction. Replace those helpers with the shared Button, Field, Input/Textarea, and Select components now that direct imports are available.

AGENTS.md reference: AGENTS.md:L35-L41

Useful? React with 👍 / 👎.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 One upgrade blocker: existing Claude Code installations make the entire plugin catalog enter recovery. Fix the migration before merging.

serde_json::from_str(include_str!(
"../../../src/bundled/claude-code/manifest.json"
))
.expect("claude code manifest"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P1] Migrate existing Claude Code installations before classifying the ID as bundled

A profile that installed the previous buzz.claude-code plugin now fails Manager::read() at lines 512–516 because installed entries cannot have bundled IDs. Reproduced by installing/enabling the old plugin with the base CLI, then using the same isolated profile with this commit: plugin list, plugin disable buzz.claude-code, and plugin remove buzz.claude-code all exit 1 with Invalid installed plugin identity. The desktop enters catalog recovery and activates no plugins, including unrelated bundled plugins; resetting the registry drops other installed entries and overrides.

Add a targeted migration for this formerly installable ID before validation, preserving enabled preferences and other registry state, plus a base-to-head/restart regression test. Keep validation for unrelated bundled-ID collisions intact.

@wesbillman wesbillman 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.

Two changes needed: unsupported-platform gating and shared-control adoption, detailed inline and consistent with the existing reports. I have not reopened the explicitly documented manual-uninstall upgrade tradeoff.

Star Lord automated source review via Wes’s account — head b3a96d201b09c1acb8704da10c93e199cfdbb9bb, base 8da84af7ac8af9fddf237dc00065126d7dabe681. Source-only; no tests, app launch, CI verification, or native bundled-agent run.

Comment thread src/bundled/claude-code/index.ts Outdated
@@ -13,6 +13,8 @@ const HANDOVER_MS = 2 * 60_000;

export const inject = ["react", "agents2", "host", "relay"];
export const apply: PluginModule["apply"] = (ctx) => {
// Only the desktop app can start `claude`; no unusable type in a browser.
if (!isTauri()) return;

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.

[P2] Do not register the default type on unsupported Windows hosts

Confirmed the existing platform finding: isTauri() includes Windows, but the unchanged manifest requires bash for Install and base64 for file uploads, and host_process.rs:294–298 executes those programs directly. A Windows desktop without those Unix tools now advertises a default type whose setup/upload actions fail. Match the terminal plugin’s supported-platform gate (or provide and validate Windows-native process declarations), and cover Windows plus browser registration explicitly.

Comment thread src/bundled/index.ts
@@ -177,6 +179,11 @@ export const bundledPlugins: readonly BundledPlugin[] = [
module: agents2,
enabledByDefault: true,
},
{
manifest: { ...claudeCodeManifest, apiVersion: 1 },

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.

[P2] Use shared controls when promoting these tabs to bundled UI

Confirmed the existing control finding. tabs.ts:40–99 still builds external-plugin substitutes: pending Install/Save sets native disabled, removing the focused action from keyboard navigation, and field descriptions have no accessible connection to their controls. DESIGN.md:637–639,697–704 requires retained loading focus and connected help/error text; the shared Button and Field implement these. Replace the local helpers with shared Button/Field/Input/Textarea/Select now that direct imports are supported, and cover pending, failed-save/retry and cancel focus behavior.

@wesbillman wesbillman 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.

One change needed: add the missing DCO sign-off to commit 5bd42e7528bcb4a42894231febe0e3c0f8649382. Its message has co-author credit but no Signed-off-by, contrary to AGENTS.md:196–204; the hosted DCO Check confirms 1/2 commits are missing certification. Preserve authorship and existing credit, add only a valid certification, and verify DCO at the updated head.

The previous platform/control findings are addressed in source; no new actionable code defect found in the migration or shared-control fixes.

Star Lord automated source review via Wes’s account. Head 5bd42e7528bcb4a42894231febe0e3c0f8649382; base 8da84af7ac8af9fddf237dc00065126d7dabe681. No tests or app execution. CI snapshot: DCO and Rust/tool integration failed; other jobs unfinished. Native bundled-agent acceptance remains unverified.

ART and others added 2 commits October 9, 2026 13:25
Moves the plugin from src/agent-plugins into src/bundled and adds it to
both bundled lists (JS index and the native plugin-manager catalog),
enabled by default. Desktop only: the browser host cannot start
`claude`, so the type is not registered there. Drops the separate
installable-plugin build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
…rols

- Registry read drops an installed buzz.claude-code entry now that the id
  is bundled, keeping a disabled install's setting. Other installed entries
  with bundled ids still fail.
- Register the type only on Mac/Linux desktop: setup and file uploads run
  bash and base64.
- Rebuild the tabs with the shared Button, Field, Input, Select and
  Textarea, so pending actions keep focus and help text is attached.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz>
@baxen
baxen force-pushed the art/bundle-claude-code branch from 5bd42e7 to a97f78c Compare October 9, 2026 20:28
@baxen
baxen merged commit 8820e5a into main Oct 9, 2026
23 checks passed
@baxen
baxen deleted the art/bundle-claude-code branch October 9, 2026 20:42
wpfleger96 pushed a commit that referenced this pull request Oct 9, 2026
* origin/main: (22 commits)
  feat(teams): edit shared team instructions in their own record (#775)
  Use Sonner for bottom-right app toasts (#813)
  Allow bounded stdin data for fixed plugin host commands (#769)
  Add native Codex agents with CLI defaults (#751)
  Register placeholder Builderlab agent type in Agents2 (#788)
  feat(claude-code): bundle the Claude Code agent type by default (#818)
  perf(datetime): share compact clock formatting (#609)
  fix(agents): restore Rust test compilation on main (AgentEdit effort) (#821)
  polish inbox controls and resizable previews (#770)
  fix(reactions): open the reactor preview on a short hover (#730)
  perf(messages): batch timestamp locale and timezone lookups (#592)
  feat(agents): carry effort level in agent and team exports (#779)
  fix(agents): strip baked team instructions from imported prompts (#774)
  fix(agents): show renamed Buzz 1.0 agents in browser and publish rename profiles (#702)
  feat(channels): drag channels into and out of Starred (#745)
  test(mentions): wait for picker search focus before sending keys (#816)
  feat(conversation): show unjoined channel links by name, with a preview (#796)
  Polish Canvas-backed Todos panel and recovery (#804)
  docs: define shared composition rules for Buzz UI (#802)
  feat(channels): copy a channel link from the channel menu (#811)
  ...

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	crates/agent-controller/src/import.rs
#	crates/agent-controller/src/import/tests.rs
#	crates/agent-controller/src/store.rs
#	src-tauri/build.rs
#	src-tauri/capabilities/default.json
#	src-tauri/src/agents.rs
#	src-tauri/src/browser_permissions_tests.rs
#	src-tauri/src/lib.rs
#	src-tauri/src/relay/kit.rs
#	src/bundled/agents/AgentImport.test.tsx
#	src/bundled/agents/AgentImport.tsx
#	src/features/agents/control-native.ts
#	src/features/agents/control.ts
#	src/features/agents/team-instructions.ts
johnmatthewtennant pushed a commit that referenced this pull request Oct 10, 2026
* origin/main:
  Register placeholder Builderlab agent type in Agents2 (#788)
  feat(claude-code): bundle the Claude Code agent type by default (#818)

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants