* test: keep Codecov coverage on real agent communication paths PR #369 was merged before the final Codecov coverage fix landed, so this follow-up carries only the incremental real-path tests needed on top of main. The tests exercise AgentSummary lifecycle branches, mailbox fail-closed behavior, UDS client connection failure through a real capability file, and UDS response-reader framing without mock.module, warning suppression, feature fallback, or production-code churn. Constraint: PR #369 is already merged; this branch must contain only the incremental Codecov repair on top of latest main Rejected: Reopen or keep pushing the merged PR branch | merged PR refs do not update and would leave Codecov stale Rejected: Mock bun:bundle or hide warnings | would reintroduce cross-test pollution and pseudo coverage Rejected: Keep unrelated SendMessageTool production diff | it created avoidable patch-coverage debt without improving the runtime path Confidence: high Scope-risk: narrow Directive: Keep these coverage tests on real paths; do not replace them with output suppression or feature-flag mocks Tested: bunx tsc --noEmit --pretty false Tested: bun run lint Tested: bun test src\utils\__tests__\teammateMailbox.test.ts Tested: bun test src\services\AgentSummary\__tests__\agentSummary.test.ts src\services\AgentSummary\__tests__\summaryContext.test.ts src\utils\__tests__\teammateMailbox.test.ts src\utils\__tests__\udsMessaging.test.ts src\utils\__tests__\udsResponseReader.test.ts packages\builtin-tools\src\tools\SendMessageTool\__tests__\udsRecipientSanitization.test.ts Tested: bun run test:all Tested: bun test --coverage --coverage-reporter lcov --coverage-dir coverage Tested: bun run build Tested: bun run build:vite Tested: bun audit Tested: git diff --check Tested: Claude simplify review GO (.omx/artifacts/claude-simplify-codecov-20260427-1521.md) Tested: Claude security review GO (.omx/artifacts/claude-security-codecov-20260427-1522.md) Not-tested: GitHub-hosted Codecov upload after this amended commit until PR checks rerun * test: keep review assertions tied to real failure paths CodeRabbit flagged three non-blocking but valid review gaps: platform-specific mailbox errno checks, brittle UDS connection-failure message assertions, and missing AgentSummary reschedule proof after fork errors. This keeps the fixes narrow by tightening the affected assertions and adding a structured UDS connection error for tests to assert behavior instead of prose. Constraint: PR #374 is a review follow-up and must not hide warnings, skip tests, or merge the PR. Rejected: Matching the UDS failure message literal | preserves the brittle coupling CodeRabbit flagged. Rejected: Asserting only that mailbox writes throw | would allow unrelated pre-path failures to pass. Confidence: high Scope-risk: narrow Directive: Keep UDS connection-failure tests on structured error data, not display wording. Tested: bun test src/services/AgentSummary/__tests__/agentSummary.test.ts src/utils/__tests__/teammateMailbox.test.ts src/utils/__tests__/udsMessaging.test.ts Tested: bunx tsc --noEmit --pretty false Tested: bun run lint Tested: bun run test:all Tested: bun test --coverage --coverage-reporter lcov --coverage-dir coverage Tested: bun run build Tested: bun run build:vite Not-tested: GitHub-hosted CodeRabbit refresh until pushed. * test: remove brittle review follow-up assumptions CodeRabbit's second pass found two valid brittleness issues and one suggested callback-reference assertion that would not match production behavior. This keeps the production behavior unchanged: timers still schedule the summarizer closure, tests now assert timer-handle identity, and UDS connection errors use native Error.cause instead of shadowing it. Constraint: Do not manufacture behavior just to satisfy a review hint; assertions must match the real AgentSummary scheduling contract. Rejected: Assert a fresh scheduled callback function | scheduleNext intentionally passes the same runSummary closure each time. Rejected: Store a custom cause field on UdsPeerConnectionError | native Error.cause is available under ESNext/Bun. Confidence: high Scope-risk: narrow Directive: Timer tests should assert returned handle identity for ownership, not incidental numeric values. Tested: bun test src/services/AgentSummary/__tests__/agentSummary.test.ts src/utils/__tests__/udsMessaging.test.ts Tested: bunx tsc --noEmit --pretty false Tested: bun run lint Tested: bun run test:all Tested: bun test --coverage --coverage-reporter lcov --coverage-dir coverage Tested: bun run build Tested: bun run build:vite Not-tested: GitHub-hosted CodeRabbit refresh until pushed. * test: enforce structured UDS timeout failures CodeRabbit's follow-up surfaced a real consistency gap: UDS send socket errors used UdsPeerConnectionError while response timeouts still rejected a generic Error. Timeouts now use the same structured peer failure contract, and the test exercises that path through a short explicit timeout instead of waiting for the production default. The AgentSummary unchanged-fingerprint test now also asserts that the second unchanged tick does not log errors, preserving the existing behavior checks without changing production scheduling semantics. Constraint: Keep the production timeout default at 5000ms while allowing tests to exercise the timeout path quickly. Rejected: Leave timeout failures as generic Error | callers would need separate handling for the same peer connection failure class. Confidence: high Scope-risk: narrow Directive: Keep UDS send timeout and socket-error branches on the same structured error contract. Tested: bun test src/services/AgentSummary/__tests__/agentSummary.test.ts src/utils/__tests__/udsMessaging.test.ts Tested: bunx tsc --noEmit --pretty false Tested: bun run lint Tested: bun run test:all Tested: bun test --coverage --coverage-reporter lcov --coverage-dir coverage Tested: bun run build Tested: bun run build:vite Not-tested: GitHub-hosted CodeRabbit refresh until pushed. --------- Co-authored-by: unraid <local@unraid.local>
Claude Code Best V5 (CCB)
Which Claude do you like? The open source one is the best.
A reverse-engineered / decompiled source restoration of Anthropic's official Claude Code CLI tool. The goal is to reproduce most of Claude Code's functionality and engineering capabilities. It's abbreviated as CCB.
Documentation (Chinese) — PR contributions welcome.
Sponsor placeholder.
- v1: Basic runability and type checking pass
- V2: Complete engineering infrastructure
- Biome formatting may not be implemented first to avoid code conflicts
- Build pipeline complete, output runnable on both Node.js and Bun
- V3: Extensive documentation and documentation site improvements
- V4: Large-scale test suite for improved stability
- V5: Enterprise-grade monitoring/reporting, missing tools补全, restrictions removed
- Removed anti-distillation code
- Web search capability (using Bing) Docs
- Debug mode support Docs
- Disabled auto-updates
- Custom Sentry error reporting support Docs
- Custom GrowthBook support (GB is open source — configure your own feature flag platform) Docs
- Custom login mode — configure Claude models your way
- V6: Large-scale refactoring, full modular packaging
- V6 will be a new branch; main branch will be archived as a historical version
I don't know how long this project will survive. Star + Fork + git clone + .zip is the safest bet.
This project updates rapidly — Opus continuously optimizes in the background, with new changes almost every few hours.
Claude has burned over $1000, out of budget, switching to GLM to continue; @zai-org GLM 5.1 is quite capable.
Quick Start
Prerequisites
Make sure you're on the latest version of Bun, otherwise you'll run into all sorts of weird bugs. Run bun upgrade!
- Bun >= 1.3.11
Install Bun:
# Linux and macOS
curl -fsSL https://bun.sh/install | bash
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
Post-installation steps:
-
Make
bunavailable in the current terminalThe installer adds
~/.bun/binto the matching shell configuration file. On macOS with the default zsh shell, you may see:Added "~/.bun/bin" to $PATH in "~/.zshrc"Restart the current shell as the installer suggests:
exec /bin/zshIf you use bash, reload the bash configuration:
source ~/.bashrcWindows PowerShell users can close and reopen PowerShell.
-
Verify that Bun is available:
bun --help bun --version -
Update to latest version (if already installed):
bun upgrade
- Standard Claude Code configuration — each provider has its own setup method
Command Execution Location
- Bun installation and checking commands can be run from any directory:
curl -fsSL https://bun.sh/install | bash,bun --help,bun --version,bun upgrade - Project dependency installation, development mode, and builds must be run from this repository root, the directory containing
package.json.
Install
cd /path/to/claude-code
bun install
Run
# Dev mode — if you see version 888, it's working
bun run dev
# Build
bun run build
The build uses code splitting (build.ts), outputting to dist/ (entry dist/cli.js + ~450 chunk files).
The build output runs on both Bun and Node.js — you can publish to a private registry and run directly.
If you encounter a bug, please open an issue — we'll prioritize it.
First-time Setup /login
After the first run, enter /login in the REPL to access the login configuration screen. Select Anthropic Compatible to connect to third-party API-compatible services (no Anthropic account required).
Fields to fill in:
| Field | Description | Example |
|---|---|---|
| Base URL | API service URL | https://api.example.com/v1 |
| API Key | Authentication key | sk-xxx |
| Haiku Model | Fast model ID | claude-haiku-4-5-20251001 |
| Sonnet Model | Balanced model ID | claude-sonnet-4-6 |
| Opus Model | High-performance model ID | claude-opus-4-6 |
- Tab / Shift+Tab to switch fields, Enter to confirm and move to the next, press Enter on the last field to save
- Model fields auto-fill from current environment variables
- Configuration saves to
~/.claude/settings.jsonunder theenvkey, effective immediately
You can also edit ~/.claude/settings.json directly:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.example.com/v1",
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6"
}
}
Supports all Anthropic API-compatible services (e.g., OpenRouter, AWS Bedrock proxies, etc.) as long as the interface is compatible with the Messages API.
Feature Flags
All feature toggles are enabled via FEATURE_<FLAG_NAME>=1 environment variables, for example:
FEATURE_BUDDY=1 FEATURE_FORK_SUBAGENT=1 bun run dev
See docs/features/ for detailed descriptions of each feature. Contributions welcome.
VS Code Debugging
The TUI (REPL) mode requires a real terminal and cannot be launched directly via VS Code's launch config. Use attach mode:
Steps
-
Start inspect server in terminal:
bun run dev:inspectThis outputs an address like
ws://localhost:8888/xxxxxxxx. -
Attach debugger from VS Code:
- Set breakpoints in
src/files - Press F5 → select "Attach to Bun (TUI debug)"
- Set breakpoints in
Documentation & Links
- Online docs (Mintlify): ccb.agent-aura.top — source in
docs/, PR contributions welcome - DeepWiki: https://deepwiki.com/claude-code-best/claude-code
Contributors
Star History
License
This project is for educational and research purposes only. All rights to Claude Code belong to Anthropic.