Scope: read-only comparison between the original TypeScript source at `/home/bellman/Workspace/claude-code/src/` and the Rust port under `rust/crates/`.
Date: 2026-04-01
Method: compared feature surfaces, registries, entrypoints, and runtime plumbing only. No TypeScript source was copied.
- This is a focused feature-gap report for `tools`, `hooks`, `plugins`, `skills`, `cli`, `assistant`, and `services`.
## Executive summary
## Executive summary
The Rust port has a good foundation for:
The Rust port has a solid core for:
-Anthropic API/OAuth basics
-basic prompt/REPL flow
-local conversation/session state
-session/runtime state
-a core tool loop
-Anthropic API/OAuth plumbing
-MCP stdio/bootstrap support
-a compact MVP tool registry
- CLAUDE.md discovery
- CLAUDE.md discovery
-a small but usable built-in tool set
-MCP config parsing/bootstrap primitives
It is **not feature-parity** with the TypeScript CLI.
But it is still materially behind the TypeScript implementation in six major areas:
1.**Tools surface area** is much smaller.
2.**Hook execution** is largely missing; Rust mostly loads hook config but does not run a TS-style PreToolUse/PostToolUse pipeline.
3.**Plugins** are effectively absent in Rust.
4.**Skills** are only partially implemented in Rust via direct `SKILL.md` loading; there is no comparable skills command/discovery/registration surface.
5.**CLI** breadth is much narrower in Rust.
6.**Assistant/tool orchestration** lacks the richer streaming concurrency, hook integration, and orchestration behavior present in TS.
7.**Services** in Rust cover API/auth/runtime basics, but many higher-level TS services are missing.
Largest gaps:
## Critical bug status on this branch
- **plugins** are effectively absent in Rust
- **hooks** are parsed but not executed in Rust
Targeted critical items requested by the user:
- **CLI breadth** is much narrower in Rust
- **Prompt mode tools enabled**: fixed in `rust/crates/rusty-claude-cli/src/main.rs:75-82`
- **skills** are local-file only in Rust, without the TS registry/bundled pipeline
- **Default permission mode = danger-full-access**: fixed in `rust/crates/rusty-claude-cli/src/args.rs:12-16`, `rust/crates/rusty-claude-cli/src/main.rs:348-353`, and starter config `rust/crates/rusty-claude-cli/src/init.rs:4-9`
- **assistant orchestration** lacks TS hook-aware orchestration and remote/structured transports
- **Tool input `{}` prefix bug**: fixed/guarded in streaming vs non-stream paths at `rust/crates/rusty-claude-cli/src/main.rs:2211-2256`
- **services** beyond core API/OAuth/MCP are mostly missing in Rust
- **Unlimited max_iterations**: already present at `rust/crates/runtime/src/conversation.rs:143-148` with `usize::MAX` initialization at `rust/crates/runtime/src/conversation.rs:119`
Build/test/manual verification is tracked separately below and must pass before the branch is considered done.
---
---
## tools/
## 1) tools/
### TS exists
### Upstream TS has
Evidence:
- Large per-tool module surface under `src/tools/`, including agent/task tools, AskUserQuestion, MCP tools, plan/worktree tools, REPL, schedule/task tools, synthetic output, brief/upload, and more.
-Tool execution/orchestration is split across `src/services/tools/StreamingToolExecutor.ts`, `src/services/tools/toolExecution.ts`, `src/services/tools/toolHooks.ts`, and `src/services/tools/toolOrchestration.ts`.
- Current built-ins include shell/file/search/web/todo/skill/agent/config/notebook/repl/powershell primitives.
- Runtime execution is wired through `rust/crates/tools/src/lib.rs` and `rust/crates/runtime/src/conversation.rs`.
### Missing or broken in Rust
### Missing or broken in Rust
-No Rust equivalents for major TS tools such as `AskUserQuestionTool`, `LSPTool`, `ListMcpResourcesTool`, `MCPTool`, `McpAuthTool`, `ReadMcpResourceTool`, `RemoteTriggerTool`, `ScheduleCronTool`, `Task*`, `Team*`, and several workflow/system tools.
-**Missing large chunks of the upstream tool catalog**: I did not find Rust equivalents for AskUserQuestion, MCP resource listing/reading tools, plan/worktree entry/exit tools, task management tools, remote trigger, synthetic output, or schedule/cron tools.
-Rust tool surface is still explicitly an MVP registry, not a parity registry.
-**Tool decomposition is much coarser**: TS isolates tool-specific validation/security/UI behavior per tool module; Rust centralizes almost everything in one file (`rust/crates/tools/src/lib.rs`).
-TS supports `PreToolUse`, `PostToolUse`, and broader hook-driven behaviorsconfigured through settings and documented in `src/skills/bundled/updateConfig.ts`.
-`rust/crates/runtime/src/conversation.rs:151-208` goes straight from assistant tool_use -> permission check -> tool execute -> tool_result, without TS-style PreToolUse/PostToolUse processing.
-No Rust `/hooks` parity command.
-I did **not** find Rust counterparts to TS files like `toolHooks.ts` or `PermissionContext.ts` that execute hook callbacks and alter/block tool behavior.
- Result: Rust appears to support **hook configuration visibility**, but not full **hook behavior parity**.
-Current Rust skill support is closer to **direct file loading** than full upstream **skill discovery/registration/command integration**.
- No TS-style live skill discovery/reload/change handling.
- No comparable session-memory / team-memory integration around skills.
**Status:** basic local skill loading only.
---
---
## cli/
## 5) cli/
### TS exists
### Upstream TS has
Evidence:
- Broad CLI handler and transport surface.
-Large command surface under `src/commands/` including `agents`, `hooks`, `mcp`, `memory`, `model`, `permissions`, `plan`, `plugin`, `resume`, `review`, `skills`, `tasks`, and many more.
-Evidence:
-Structured/remote transport stack in `src/cli/structuredIO.ts`, `src/cli/remoteIO.ts`, and `src/cli/transports/*`.
-`src/cli/handlers/agents.ts:2-32`
- CLI handler split in`src/cli/handlers/*`.
-`src/cli/handlers/auth.ts`
-`src/cli/handlers/autoMode.ts:24,35,73`
-`src/cli/handlers/plugins.ts:2-3,101,157,668`
-`src/cli/remoteIO.ts:25-35,118-127`
-`src/cli/transports/SSETransport.ts`
-`src/cli/transports/WebSocketTransport.ts`
-`src/cli/transports/HybridTransport.ts`
-`src/cli/transports/SerialBatchEventUploader.ts`
-`src/cli/transports/WorkerStateUploader.ts`
### Rust exists
### Rust currently has
Evidence:
- Minimal top-level subcommands in `rust/crates/rusty-claude-cli/src/args.rs:29-39` and `rust/crates/rusty-claude-cli/src/main.rs:67-90,242-261`.
- Shared slash command registry in `rust/crates/commands/src/lib.rs`.
- Slash command surface is 15 commands total in `rust/crates/commands/src/lib.rs:41-166,389`.
- Main CLI/repl/prompt handling lives in `rust/crates/rusty-claude-cli/src/main.rs`.
### Missing or broken in Rust
### Missing or broken in Rust
- Missing major TS command families: `/agents`, `/hooks`, `/mcp`, `/plugin`, `/skills`, `/plan`, `/review`, `/tasks`, and many others.
-**Missing major CLI subcommand families**: agents, plugins, mcp management, auto-mode tooling, and many other TS commands.
-No Rust equivalent to TS structured IO / remote transport layers.
-**Missing remote/transport stack parity**: I did not find Rust equivalents to TS remote structured IO / SSE / websocket / CCR transport layers.
-No TS-style handler decomposition for auth/plugins/MCP/agents.
-**Slash command breadth is much narrower** than TS command inventory under `src/commands/`.
-JSON promptmode is improved on this branch, but still not clean transport parity: empirical verification shows tool-capable JSON output can emit human-readable tool-result lines before the final JSON object.
-**Prompt-mode parity bug** was present and is now fixed for this branch’s prompt path.
**Status:** functional local CLI core, much narrower than TS.
- streamed `{}` tool-input prefix behavior (`main.rs:2211-2256`) — now fixed/guarded on this branch
---
---
## services/ (API client, auth, models, MCP)
## 7) services/
### TS exists
### Upstream TS has
Evidence:
- Very broad service layer, including API, analytics, compact/session memory, prompt suggestions, plugin services, MCP service helpers, LSP management, policy limits, team memory sync, notifier/tips, etc.
- Additional service layers for analytics, prompt suggestion, session memory, plugin operations, settings sync, policy limits, team memory sync, notifier, voice, and more under`src/services/*`.
-`src/services/mcp/*`
-`src/services/plugins/*`
-`src/services/lsp/*`
-`src/services/compact/*`
-`src/services/SessionMemory/*`
-`src/services/PromptSuggestion/*`
-`src/services/analytics/*`
-`src/services/teamMemorySync/*`
### Rust exists
### Rust currently has
Evidence:
- Core service equivalents for:
- Core Anthropic API client in`rust/crates/api/src/{client,error,sse,types}.rs`.
- API client + SSE:`rust/crates/api/src/client.rs`, `rust/crates/api/src/sse.rs`, `rust/crates/api/src/types.rs`
- OAuth support in`rust/crates/runtime/src/oauth.rs`.
- OAuth:`rust/crates/runtime/src/oauth.rs`
- MCP config/bootstrap/client support in`rust/crates/runtime/src/{config,mcp,mcp_client,mcp_stdio}.rs`.
-Most TS service ecosystem beyond core messaging/auth/MCP is absent.
-**Missing many higher-level services**: analytics, plugin services, prompt suggestion, team memory sync, richer LSP service management, notifier/tips ecosystem, and much of the surrounding product/service scaffolding.
-No TS-equivalent plugin service layer.
-Rust is closer to a **runtime/API core** than a full parity implementation of the TS service layer.
- No TS-equivalent analytics/settings-sync/policy-limit/team-memory subsystems.
- No TS-style MCP connection-manager/UI layer.
- Model/provider ergonomics remain thinner than TS.
**Status:** core foundation exists; broader service ecosystem missing.
---
---
## Critical bug status in this worktree
## Highest-priority parity gaps after the critical bug fixes
### Fixed
1.**Hook execution parity**
-**Prompt mode tools enabled**
-Config exists, execution does not appear to.
-`rust/crates/rusty-claude-cli/src/main.rs` now constructs prompt mode with `LiveCli::new(model, true, ...)`.
-This affects permissions, tool interception, and continuation behavior.
- **Default permission mode = DangerFullAccess**
- Runtime default now resolves to `DangerFullAccess` in `rust/crates/rusty-claude-cli/src/main.rs`.
- Clap default also uses `DangerFullAccess` in `rust/crates/rusty-claude-cli/src/args.rs`.
- Init template writes `dontAsk` in `rust/crates/rusty-claude-cli/src/init.rs`.
- **Streaming `{}` tool-input prefix bug**
-`rust/crates/rusty-claude-cli/src/main.rs` now strips the initial empty object only for streaming tool input, while preserving legitimate `{}` in non-stream responses.
- **Unlimited max_iterations**
- Verified at `rust/crates/runtime/src/conversation.rs` with `usize::MAX`.
@@ -2284,7 +2284,7 @@ Command exceeded timeout of {timeout_ms} ms",
persisted_output_path: None,
persisted_output_path: None,
persisted_output_size: None,
persisted_output_size: None,
sandbox_status: None,
sandbox_status: None,
});
});
}
}
std::thread::sleep(Duration::from_millis(10));
std::thread::sleep(Duration::from_millis(10));
}
}
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.