Skip to content

Add agentic-bun: multi-agent dispatcher for ollama launch claude - #40403

Closed
Cazador0 wants to merge 1 commit into
oven-sh:mainfrom
Cazador0:claude/agentic-bun-multi-agents-dctgnb
Closed

Cazador0 wants to merge 1 commit into
oven-sh:mainfrom
Cazador0:claude/agentic-bun-multi-agents-dctgnb

Conversation

@Cazador0

Copy link
Copy Markdown

A zero-dependency Bun CLI that turns a short wizard (or flags) into one or more Claude Code agents running against a local Ollama model.

It is a dispatcher, not an agent runtime: each agent is a real claude -p process spawned through ollama launch claude, so tool use comes from that harness. This package owns the wizard, the per-agent prompts, the concurrency pool, output multiplexing and the final report.

  • src/ollama.ts probes the local install at startup (--version, launch --help, list) and only passes --model/--yes when the help text advertises them, so a changed Ollama CLI degrades with a note instead of a spawn failure. --direct skips ollama launch and runs claude against $OLLAMA_HOST with the Anthropic-compatible env vars set locally.
  • src/plan.ts builds the prompts. Multi-agent prompts list the sibling tasks and tell each agent to stay in its lane, not to commit, push, or run repo-wide destructive commands. Splitting a goal into N tasks is one throwaway model call, not a planner.
  • src/runner.ts runs the pool: bounded concurrency, per-agent line prefixes, per-agent timeouts, SIGINT teardown, and a summary/JSON report.

Ollama could not be installed in the development environment (no binary, and the outbound proxy blocks ollama.com), so no flag was verified against a real install and no end-to-end run against a real model was performed. That is called out in the README. The 42 tests run the CLI end to end against a stub ollama that records the argv it was launched with; the concurrency tests use a rendezvous in the stub so they assert parallelism without depending on timing.

Runs on the system bun - this package is plain TypeScript and never calls into Bun's native code, so no debug build is involved.

What does this PR do?

How did you verify your code works?

A zero-dependency Bun CLI that turns a short wizard (or flags) into one or
more Claude Code agents running against a local Ollama model.

It is a dispatcher, not an agent runtime: each agent is a real `claude -p`
process spawned through `ollama launch claude`, so tool use comes from that
harness. This package owns the wizard, the per-agent prompts, the concurrency
pool, output multiplexing and the final report.

- src/ollama.ts probes the local install at startup (`--version`,
  `launch --help`, `list`) and only passes `--model`/`--yes` when the help
  text advertises them, so a changed Ollama CLI degrades with a note instead
  of a spawn failure. `--direct` skips `ollama launch` and runs `claude`
  against $OLLAMA_HOST with the Anthropic-compatible env vars set locally.
- src/plan.ts builds the prompts. Multi-agent prompts list the sibling tasks
  and tell each agent to stay in its lane, not to commit, push, or run
  repo-wide destructive commands. Splitting a goal into N tasks is one
  throwaway model call, not a planner.
- src/runner.ts runs the pool: bounded concurrency, per-agent line prefixes,
  per-agent timeouts, SIGINT teardown, and a summary/JSON report.

Ollama could not be installed in the development environment (no binary, and
the outbound proxy blocks ollama.com), so no flag was verified against a real
install and no end-to-end run against a real model was performed. That is
called out in the README. The 42 tests run the CLI end to end against a stub
`ollama` that records the argv it was launched with; the concurrency tests
use a rendezvous in the stub so they assert parallelism without depending on
timing.

Runs on the system bun - this package is plain TypeScript and never calls
into Bun's native code, so no debug build is involved.

@claude claude Bot 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@Cazador0 Cazador0 closed this Aug 25, 2026
@Cazador0 Cazador0 reopened this Aug 25, 2026
@Cazador0 Cazador0 closed this Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a8ca195b-eeed-480d-a5ad-3a86d3656f3b

📥 Commits

Reviewing files that changed from the base of the PR and between 0823e50 and 88178f6.

📒 Files selected for processing (10)
  • packages/agentic-bun/README.md
  • packages/agentic-bun/package.json
  • packages/agentic-bun/src/cli.ts
  • packages/agentic-bun/src/ollama.ts
  • packages/agentic-bun/src/plan.ts
  • packages/agentic-bun/src/runner.ts
  • packages/agentic-bun/test/cli.test.ts
  • packages/agentic-bun/test/fixtures/ollama-stub.sh
  • packages/agentic-bun/test/unit.test.ts
  • packages/agentic-bun/tsconfig.json

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

Changes

This PR adds the private agentic-bun Bun package. It provides Ollama capability discovery, task planning, concurrent Claude agent execution, interactive CLI workflows, dry-run and JSON modes, and unit and end-to-end tests.

Agentic Bun dispatcher

Layer / File(s) Summary
Ollama discovery and task planning
packages/agentic-bun/src/ollama.ts, packages/agentic-bun/src/plan.ts
Adds Ollama probing, launch capability detection, prompt construction, task parsing, and agent specification mapping.
Concurrent Claude execution
packages/agentic-bun/src/runner.ts
Adds direct and launch-mode command construction, output handling, timeouts, bounded concurrency, interruption handling, and ordered results.
CLI orchestration and package entrypoint
packages/agentic-bun/src/cli.ts, packages/agentic-bun/package.json, packages/agentic-bun/README.md
Adds argument parsing, preflight checks, wizard input, planning, job execution, result reporting, executable registration, scripts, and usage documentation.
Test fixtures and validation
packages/agentic-bun/test/*, packages/agentic-bun/tsconfig.json
Adds Ollama and Claude stubs plus unit and end-to-end coverage for parsing, execution, planning, concurrency, preflight checks, wizard behavior, and output modes.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant