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
The Rust port has a good foundation for:
-Anthropic API/OAuth basics
-local conversation/session state
-a core tool loop
-MCP stdio/bootstrap support
The Rust port has a solid core for:
-basic prompt/REPL flow
-session/runtime state
-Anthropic API/OAuth plumbing
-a compact MVP tool registry
- 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:
- **plugins** are effectively absent in Rust
- **hooks** are parsed but not executed in Rust
- **CLI breadth** is much narrower in Rust
- **skills** are local-file only in Rust, without the TS registry/bundled pipeline
- **assistant orchestration** lacks TS hook-aware orchestration and remote/structured transports
- **services** beyond core API/OAuth/MCP are mostly missing in Rust
## Critical bug status on this branch
Targeted critical items requested by the user:
- **Prompt mode tools enabled**: fixed in `rust/crates/rusty-claude-cli/src/main.rs:75-82`
- **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`
- **Tool input `{}` prefix bug**: fixed/guarded in streaming vs non-stream paths at `rust/crates/rusty-claude-cli/src/main.rs:2211-2256`
- **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.
-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`.
### Upstream TS has
- 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.
-No Rust equivalents for major TS tools such as `AskUserQuestionTool`, `LSPTool`, `ListMcpResourcesTool`, `MCPTool`, `McpAuthTool`, `ReadMcpResourceTool`, `RemoteTriggerTool`, `ScheduleCronTool`, `Task*`, `Team*`, and several workflow/system tools.
-Rust tool surface is still explicitly an MVP registry, not a parity registry.
-**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.
-**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`).
-**Likely parity impact**: lower fidelity tool prompting, weaker per-tool behavior specialization, and fewer native tool choices exposed to the model.
---
## hooks/
## 2) hooks/
### TS exists
Evidence:
-Hook command surface under `src/commands/hooks/`.
-Runtime hook machinery in `src/services/tools/toolHooks.ts` and `src/services/tools/toolExecution.ts`.
-TS supports `PreToolUse`, `PostToolUse`, and broader hook-driven behaviorsconfigured through settings and documented in `src/skills/bundled/updateConfig.ts`.
### Upstream TS has
- A full permission and tool-hook system with **PermissionRequest**, **PreToolUse**, **PostToolUse**, and failure/cancellation handling.
-**No comparable hook execution pipeline found** in the Rust runtimeconversation/tool execution path.
-`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.
-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**.
---
## plugins/
## 3) plugins/
### TS exists
Evidence:
-Built-in plugin scaffolding in `src/plugins/builtinPlugins.ts` and `src/plugins/bundled/index.ts`.
-Plugin lifecycle/services in `src/services/plugins/PluginInstallationManager.ts` and `src/services/plugins/pluginOperations.ts`.
-CLI/plugin command surface under `src/commands/plugin/` and `src/commands/reload-plugins/`.
### Upstream TS has
- Built-in and bundled plugin registration plus CLI/service support for validate/list/install/uninstall/enable/disable/update flows.
-Current Rust skill support is closer to **direct file loading** than full upstream **skill discovery/registration/command integration**.
---
## cli/
## 5) cli/
### TS exists
Evidence:
-Large command surface under `src/commands/` including `agents`, `hooks`, `mcp`, `memory`, `model`, `permissions`, `plan`, `plugin`, `resume`, `review`, `skills`, `tasks`, and many more.
-Structured/remote transport stack in `src/cli/structuredIO.ts`, `src/cli/remoteIO.ts`, and `src/cli/transports/*`.
- CLI handler split in`src/cli/handlers/*`.
### Upstream TS has
- Broad CLI handler and transport surface.
-Evidence:
-`src/cli/handlers/agents.ts:2-32`
-`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
Evidence:
- Shared slash command registry in `rust/crates/commands/src/lib.rs`.
- Main CLI/repl/prompt handling lives in `rust/crates/rusty-claude-cli/src/main.rs`.
### Rust currently has
- 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`.
- Slash command surface is 15 commands total in `rust/crates/commands/src/lib.rs:41-166,389`.
### Missing or broken in Rust
- Missing major TS command families: `/agents`, `/hooks`, `/mcp`, `/plugin`, `/skills`, `/plan`, `/review`, `/tasks`, and many others.
-No Rust equivalent to TS structured IO / remote transport layers.
-No TS-style handler decomposition for auth/plugins/MCP/agents.
-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.
**Status:** functional local CLI core, much narrower than TS.
-**Missing major CLI subcommand families**: agents, plugins, mcp management, auto-mode tooling, and many other TS commands.
-**Missing remote/transport stack parity**: I did not find Rust equivalents to TS remote structured IO / SSE / websocket / CCR transport layers.
-**Slash command breadth is much narrower** than TS command inventory under `src/commands/`.
-**Prompt-mode parity bug** was present and is now fixed for this branch’s prompt path.
-**No integrated PreToolUse/PostToolUse hook participation** in assistant execution.
-**No comparable orchestration layer for richer tool event semantics** found.
-Historically broken parity items in prompt mode were:
- prompt tool enablement (`main.rs:75-82`) — now fixed on this branch
- 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
Evidence:
-API services under `src/services/api/*`.
-OAuth services under `src/services/oauth/*`.
-MCP services under`src/services/mcp/*`.
- 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/*`.
### Upstream TS has
- 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.
-Most TS service ecosystem beyond core messaging/auth/MCP is absent.
-No TS-equivalent plugin 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.
-**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.
-Rust is closer to a **runtime/API core** than a full parity implementation of the TS service layer.
---
## Critical bug status in this worktree
## Highest-priority parity gaps after the critical bug fixes
### Fixed
-**Prompt mode tools enabled**
-`rust/crates/rusty-claude-cli/src/main.rs` now constructs prompt mode with `LiveCli::new(model, true, ...)`.
- **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`.
1.**Hook execution parity**
-Config exists, execution does not appear to.
-This affects permissions, tool interception, and continuation behavior.
### Remaining notable parity issue
-**JSON prompt output cleanliness**
- Tool-capable JSON mode now loops, but empirical verification still shows pre-JSON human-readable tool-result output when tools fire.
@@ -2284,7 +2284,7 @@ Command exceeded timeout of {timeout_ms} ms",
persisted_output_path: None,
persisted_output_size: None,
sandbox_status: None,
});
});
}
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.