Core changes:
- Added claw-code/src/token_budget.py for projected prompt size, chat-framing overhead, output reserve, and soft/hard input limits.
- Wired preflight prompt-length validation and auto-compact/context collapse into claw-code/src/agent_runtime.py.
- Extended claw-code/src/compact.py so compaction reports usage back to the runtime.
- Added inspection surfaces in claw-code/src/agent_slash_commands.py and claw-code/src/main.py:
- /token-budget and /budget
- token-budget
- Hardened claw-code/src/tokenizer_runtime.py so arbitrary simple model names fall back cleanly instead of trying a slow Transformers
lookup.
- Exported the new helpers in claw-code/src/__init__.py.
Docs and tracking:
- Updated claw-code/PARITY_CHECKLIST.md to mark prompt-length validation, token-budget calculation, and auto-compact/context collapse as
done.
- Updated claw-code/README.md and claw-code/TESTING_GUIDE.md with the new commands and behavior.
Tests:
- Added claw-code/tests/test_token_budget.py.
- Updated claw-code/tests/test_agent_runtime.py, claw-code/tests/test_agent_slash_commands.py, claw-code/tests/test_main.py, and claw-code/
tests/test_agent_context_usage.py.
- Verified with:
- /data/fs201059/aa17626/miniconda3/bin/python3 -m compileall src tests
- /data/fs201059/aa17626/miniconda3/bin/python3 -m unittest -v tests.test_token_budget
tests.test_agent_runtime.AgentRuntimeTests.test_agent_rejects_prompt_before_backend_when_preflight_input_budget_is_exceeded
tests.test_agent_runtime.AgentRuntimeTests.test_agent_auto_compacts_context_before_next_model_call tests.test_agent_slash_commands
tests.test_main tests.test_compact tests.test_tokenizer_runtime tests.test_agent_context_usage
- Result: 71 tests, OK
41 KiB
Parity Checklist Against npm src
This document tracks what is already implemented in Python and what is still missing compared with the upstream npm runtime.
This is a functionality-oriented checklist, not a line-by-line source equivalence claim. Large parts of the mirrored Python workspace still act as inventory or scaffolding, while the working Python runtime currently lives mainly in src/agent_runtime.py, src/query_engine.py, src/agent_tools.py, src/agent_prompting.py, src/agent_context.py, src/agent_manager.py, src/plugin_runtime.py, src/agent_slash_commands.py, and src/openai_compat.py.
1. Core Agent Runtime
Done:
- One-shot agent loop with iterative tool calling
- OpenAI-compatible
chat/completionsclient - Streaming token-by-token assistant output
- Local-model execution against
vLLM - Local-model execution through
Ollama - Local-model execution through
LiteLLM Proxy - Transcript-aware session object for the Python runtime
- Session save and resume support
- Configurable max-turn execution
- Permission-aware tool execution
- Structured output / JSON schema request mode
- Cost tracking and usage budget enforcement
- Scratchpad directory integration
- File history journaling for write/edit/shell tool actions
- Incremental
bashtool-result streaming events - Incremental tool-result streaming for read-only text tools
- Incremental tool-result streaming across the current Python text tool surface
- Mutable tool transcript updates during tool execution
- Transcript mutation history for replaced/tombstoned messages
- Assistant streaming and tool-call transcript mutation history
- Session-wide mutation serial tracking across transcript updates
- Structured transcript block export for messages, tool calls, and tool results
- Resume-time file-history replay reminders
- Resume-time file-history snapshot previews for file edits
- File-history snapshot ids and replay summaries for file edits
- File-history result previews for shell and delegated-tool entries
- Truncated-response continuation flow for
finish_reason=length - Basic snipping of older tool/tool-call messages for context control
- Basic automatic compact-boundary insertion with preserved recent tail
- Reactive compaction retry after prompt-too-long backend failures
- Reasoning-token budget enforcement
- Tool-call and delegated-task budget enforcement
- Resume-aware cumulative model-call budgets
- Resume-aware cumulative session usage/cost persistence
- Basic nested-agent delegation tool
- Sequential multi-subtask delegation with parent-context carryover
- Dependency-aware delegated subtasks
- Topological dependency-batch delegation planning
- Basic agent-manager lineage tracking for nested agents
- Managed agent-group membership tracking with child indices
- Agent-manager strategy and batch summary tracking for delegated groups
- Delegated child-session resume by saved session id
- Agent-manager tracking for resumed child-session lineage
- Plugin-cache discovery and prompt-context injection
- Manifest-based plugin runtime discovery
- Manifest-defined plugin hooks for before-prompt and after-turn runtime injection
- Manifest-defined plugin lifecycle hooks for resume, persist, and delegate phases
- Manifest-defined plugin tool aliases over base runtime tools
- Manifest-defined executable virtual tools
- Manifest-defined plugin tool blocking
- Manifest-defined plugin
beforeToolguidance - Manifest-defined plugin tool-result guidance injected back into the transcript
- Plugin runtime session-state persistence and resume restoration
- Manifest-based hook/policy runtime discovery
- Hook/policy before-prompt runtime injection
- Hook/policy after-turn runtime events
- Hook/policy tool preflight guidance
- Hook/policy tool blocking
- Hook/policy after-tool guidance
- Hook/policy budget override loading
- Hook/policy safe-environment overlay for shell tools
- Local manifest-backed MCP resource discovery
- Local MCP resource listing and reading
- MCP-backed runtime tools for local resource access
- Real stdio MCP client transport for
initialize,resources/list,resources/read,tools/list, andtools/call - Transport-backed MCP tool listing and execution
- Local manifest-backed remote runtime discovery
- Local remote profile listing and summary reporting
- Local remote connect/disconnect state persistence
- Local manifest/env-backed search runtime discovery
- Local search-provider activation persistence
- Provider-backed web search execution against configured search backends
- Local heuristic LSP runtime for definitions, references, hover, document symbols, workspace symbols, call hierarchy, and diagnostics
- Local persistent task runtime discovery
- Local task create/get/list/update runtime flows
- Local todo-list replacement runtime flow
- Local persistent plan runtime discovery
- Local plan get/update/clear runtime flows
- Local plan-to-task sync flow
- Dependency-aware local task state with blocking and actionable-task selection
- Local task start/complete/block/cancel execution flows
- Compaction metadata with compacted message ids
- Compaction metadata with preserved-tail ids and compaction depth
- Compaction metadata with compacted/preserved lineage ids and revision summaries
- Compaction metadata with source mutation serials and mutation totals
- Snipped-message metadata with source role/kind lineage
- Snipped-message metadata with source lineage id and revision
- Resume-time compaction / snipping replay reminder
- Resume-time compaction replay of source mutation summaries
- Preflight prompt-length validation before each model call
- Hard prompt-length stop before backend calls when the effective input budget is exceeded
- Token-budget calculation with projected prompt size, chat framing overhead, output reserve, and soft/hard input limits
- Preflight auto-compact/context collapse fallback before the next model call
- Query-engine facade that can drive the real Python runtime agent
- Query-engine runtime event counters and transcript-kind summaries
- Query-engine runtime mutation counters
- Query-engine stream-level runtime summary event
- Query-engine transcript-store compaction summaries
- Delegate-group and delegated-subtask runtime events
- Delegate-batch runtime events and summaries
- Query-engine runtime orchestration summaries for group status and child stop reasons
- Query-engine runtime context-reduction summaries
- Query-engine runtime lineage summaries
- Query-engine runtime resumed-child orchestration summaries
Missing:
- Full partial tool-result streaming parity across the complete upstream/npm tool surface
- Full rich transcript mutation behavior like the npm runtime beyond the current lineage, counters, block export, and mutation-serial tracking
- Full reasoning budgets and task budgets parity beyond the current cumulative model/tool/delegation/session-call enforcement
- Full multi-agent orchestration parity beyond dependency-aware batched delegation, resumed-child flows, and current agent-manager summaries
- Full file history snapshots and replay flows beyond the current preview/id-based implementation and delegated-batch replay metadata
- Full executable plugin lifecycle beyond manifest-driven prompt/tool/session hooks, blocking, aliases, virtual tools, and persisted runtime state
- Full session compaction / snipping parity beyond lineage-aware summaries, mutation-serial compaction metadata, and replay reminders
- Full
QueryEngine.tsparity (session init, message normalization, SDK-compatible message transforms, attachment handling) - Auto-compact and context collapse features from
query.ts - Prompt length validation from
query.ts - Token budget calculations from
query/tokenBudget.ts
2. CLI Entrypoints And Runtime Modes
Done:
- Python CLI entrypoint
agentcommandagent-chatcommandagent-resumecommandagent-promptcommandagent-contextcommandagent-context-rawcommandtoken-budgetcommand- Local background session mode
- Local background session listing (
agent-ps) - Local background session logs (
agent-logs) - Local background attach snapshot (
agent-attach) - Local background kill flow (
agent-kill) - Local daemon-style background command family (
daemon start/ps/logs/attach/kill) - Local daemon worker command path (
daemon worker) - Local remote runtime CLI modes (
remote-mode,ssh-mode,teleport-mode,direct-connect-mode,deep-link-mode) - Local remote runtime inspection commands (
remote-status,remote-profiles,remote-disconnect) - Local account runtime inspection commands (
account-status,account-profiles,account-login,account-logout) - Local search runtime inspection commands (
search-status,search-providers,search-activate,search) - Local LSP runtime inspection commands (
lsp-status,lsp-symbols,lsp-workspace-symbols,lsp-definition,lsp-references,lsp-hover,lsp-diagnostics,lsp-call-hierarchy,lsp-incoming-calls,lsp-outgoing-calls) - Local MCP runtime inspection commands (
mcp-status,mcp-resources,mcp-resource,mcp-tools,mcp-call-tool) - Inventory/helper commands such as
summary,manifest,commands, andtools
Missing:
- Full daemon supervisor parity beyond the current local daemon wrapper and worker flow
- Remote-control / bridge runtime mode (
src/bridge/— 30+ files: bridgeMain, bridgeApi, bridgeConfig, bridgeMessaging, bridgePermissionCallbacks, replBridge, sessionRunner, trustedDevice, etc.) - Browser/native-host runtime mode
- Computer-use MCP mode (
src/entrypoints/mcp.ts) - Template job mode
- Environment runner mode
- Self-hosted runner mode
- tmux fast paths
- Worktree fast paths at the CLI entrypoint level
- Node.js version check and platform setup from
setup.ts - Worktree creation/setup from
setup.ts - Terminal backup/restore from
setup.ts - Release notes checking from
setup.ts - Full
entrypoints/cli.tsxparity (version flag, feature flags, env setup, dynamic imports) - Full
entrypoints/init.tsparity (settings validation, OAuth, policy limits, telemetry, cleanup handlers) - SDK entrypoint (
entrypoints/sdk/— controlTypes, coreTypes, runtimeTypes, settingsTypes, toolTypes) - Sandbox types/network config schema (
entrypoints/sandboxTypes.ts)
3. Prompt Assembly
Done:
-
Structured Python system prompt builder
-
Intro/system/task/tool/tone/output sections
-
Session-specific prompt guidance
-
Environment-aware prompt sections
-
User context reminder injection
-
Custom system prompt override and append support
-
Local hook/policy guidance section in the Python system prompt
-
Local MCP guidance section in the Python system prompt
-
MCP transport/tool guidance section in the Python system prompt
-
Local remote-runtime guidance section in the Python system prompt
-
Local search-runtime guidance section in the Python system prompt
-
Local account-runtime guidance section in the Python system prompt
-
Local planning guidance section in the Python system prompt
-
Local task guidance section in the Python system prompt
-
Local LSP guidance section in the Python system prompt
-
Product metadata/branding from
constants/product.ts— ported tosrc/prompt_constants.py -
API limits constants from
constants/apiLimits.ts— ported tosrc/prompt_constants.py -
Tool limits constants from
constants/toolLimits.ts— ported tosrc/prompt_constants.py -
Spinner verbs from
constants/spinnerVerbs.ts(187 verbs) — ported tosrc/prompt_constants.py -
Turn-completion verbs from
constants/turnCompletionVerbs.ts(8 verbs) — ported tosrc/prompt_constants.py -
Figures/UI symbols from
constants/figures.ts— ported tosrc/prompt_constants.py -
XML tag constants from
constants/xml.ts— ported tosrc/prompt_constants.py -
Message constants from
constants/messages.ts— ported tosrc/prompt_constants.py -
Date utilities from
constants/common.ts— ported tosrc/prompt_constants.py -
System prompt section caching from
constants/systemPromptSections.ts— ported tosrc/prompt_constants.py -
Output-style variants from
constants/outputStyles.ts— ported tosrc/prompt_constants.py -
Cyber / risk instruction from
constants/cyberRiskInstruction.ts— ported tosrc/prompt_constants.py -
System prompt prefixes from
constants/system.ts— ported tosrc/prompt_constants.py -
Knowledge cutoff / model family info from
constants/prompts.ts— ported tosrc/prompt_constants.py -
Hook instruction section template — ported to
src/prompt_constants.py -
System reminders section — ported to
src/prompt_constants.py -
Summarize tool results section — ported to
src/prompt_constants.py -
Language-control section helper — ported to
src/prompt_constants.py -
Scratchpad prompt instructions helper — ported to
src/prompt_constants.py -
Default agent prompt — ported to
src/prompt_constants.py
Missing:
- Full parity with
constants/prompts.tsruntime section assembly (many sections already exist in agent_prompting.py) - MCP instruction sections (runtime MCP integration)
- Model-family-specific prompt variations (runtime)
- More exact autonomous/proactive behavior sections
- Growthbook / feature-gated prompt sections (N/A for external builds)
4. Context Building And Memory
Done:
- Current working directory snapshot
- Shell / platform / date capture
- Git status snapshot
CLAUDE.mddiscovery- Extra directory injection through
--add-dir - Session context usage report
- Tokenizer-aware context accounting with cached model-specific backends and heuristic fallback
- Raw context inspection command
- Plugin cache snapshot injection
- Manifest-based plugin runtime summary injection
- Manifest-based hook/policy summary injection
- Trust-mode, managed-settings, and safe-env context injection
- Manifest-based MCP runtime summary injection
- Manifest-based MCP transport server summary injection
- Manifest-based remote runtime summary injection
- Manifest/env-based search runtime summary injection
- Manifest-based account runtime summary injection
- Local LSP runtime summary injection
- Manifest-based plan runtime summary injection
- Manifest-based task runtime summary injection
Missing:
- Full tokenizer/chat-message framing parity beyond the current model-aware text token counters
- Full parity with
utils/queryContext.ts(context analysis, suggestions, cache shaping) - Rich memory prompt loading (
services/SessionMemory/) - Internal permission-aware memory handling
- Resume-aware prompt cache shaping used upstream
- More exact context cache invalidation rules
- Session context analysis parity (
utils/contextAnalysis.ts,utils/contextSuggestions.ts) - Full memory subsystem parity (
utils/memory/,services/extractMemories/) - Memory extraction from conversations (
services/extractMemories/extractMemories.ts) - Team memory sync (
services/teamMemorySync/) - Away summary generation (
services/awaySummary.ts) - Token estimation service (
services/tokenEstimation.ts) - Paste content storage and reference parsing (
history.ts) - Image paste handling
5. Slash Commands
Done (37 slash command names in 29 specs):
/help,/commands/context,/usage/context-raw,/env/token-budget,/budget/mcp(with subcommands:tools,tool <name>)/search(with subcommands:providers,provider,use)/remote(withenter,exit)/worktree(withenter,exit)/account(withprofiles,profile)/ask(withhistory)/login/logout/config,/settings(witheffective,source,get,set)/remotes/ssh/teleport/direct-connect/deep-link/disconnect,/remote-disconnect/resources/resource/tasks,/todo/workflows,/workflow/triggers,/trigger/teams,/team,/messages/task-next,/next-task/plan,/planner/task/prompt,/system-prompt/permissions/hooks,/policy/trust/model/tools/memory/status,/session/clear
Missing npm slash commands (from src/commands/ — 80+ commands total):
/add-dir— Add a new working directory/agents— Manage agent configurations/branch— Create a branch of the current conversation/bridge— Connect for remote-control sessions/btw— Quick side question without interrupting main conversation/chrome— Chrome extension settings/color— Set the prompt bar color for this session/compact— Clear history but keep a summary in context/copy— Copy Claude's last response to clipboard/cost— Show total cost and duration of session/desktop— Continue session in Claude Desktop/diff— View uncommitted changes and per-turn diffs/doctor— Diagnose and verify installation and settings/effort— Set effort level for model usage/exit— Exit the REPL/export— Export conversation to file or clipboard/extra-usage— Configure extra usage for rate limits/fast— Toggle fast mode/feedback— Submit feedback/files— List all files currently in context/ide— Manage IDE integrations and show status/install-github-app— Set up GitHub Actions/install-slack-app— Install Slack app/keybindings— Open keybindings config file/mobile— QR code for mobile app/output-style— Change output style/passes— Passes management/plugin— Plugin management/pr_comments— Get comments from a GitHub PR/privacy-settings— View/update privacy settings/rate-limit-options— Show options when rate limited/release-notes— View release notes/reload-plugins— Activate pending plugin changes/remote-env— Configure default remote environment/remote-setup— Remote setup configuration/rename— Rename current conversation/resume— Resume a previous conversation/rewind— Restore code/conversation to a previous point/sandbox-toggle— Toggle sandbox mode/skills— List available skills/stats— Usage statistics and activity/stickers— Order stickers/tag— Toggle a searchable tag on the session/theme— Change the theme/upgrade— Upgrade to Max/vim— Toggle Vim/Normal editing modes/voice— Toggle voice mode- Feature-gated:
/buddy,/fork,/peers,/proactive,/torch,/workflows(full), etc. - Internal:
/backfill-sessions,/break-cache,/bughunter,/commit,/commit-push-pr,/init-verifiers,/mock-limits,/version,/ultraplan,/autofix-pr, etc.
6. Built-in Tools
Tools implemented in Python (58 tools):
list_dirread_filewrite_fileedit_filenotebook_editglob_searchgrep_searchbashweb_fetchsearch_statussearch_list_providerssearch_activate_providerweb_searchLSPtool_searchsleepask_user_questionaccount_statusaccount_list_profilesaccount_loginaccount_logoutconfig_listconfig_getconfig_setmcp_list_resourcesmcp_read_resourcemcp_list_toolsmcp_call_toolremote_statusremote_list_profilesremote_connectremote_disconnectworktree_statusworktree_enterworktree_exitworkflow_listworkflow_getworkflow_runremote_triggerplan_getupdate_planplan_cleartask_nexttask_listtask_gettask_createtask_updatetask_starttask_completetask_blocktask_canceltodo_writedelegate_agentteam_listteam_getteam_createteam_deletesend_messageteam_messages
Tools in npm tools.ts not yet ported with full fidelity (40 tool dirs):
Core tools needing full port:
AgentTool— Sub-agent spawning with built-in agents (explore, general-purpose, verification, plan, claudeCodeGuide, statusline), fork support, agent memory/snapshots, resume agent, color managementSkillTool— Skill execution with bundled skillsBriefTool— Brief mode with attachments and file uploadLSPTool— Full upstream LSP fidelity beyond the current local heuristic runtime (server-backed diagnostics, go-to-definition, references, hover, symbol search, formatting)PowerShellTool— Full PowerShell execution with security, path validation, CLM types, git safetyREPLTool— Interactive REPL with primitive tools (ant-only)MCPTool— Full MCP tool execution with collapse classificationMcpAuthTool— MCP authentication handlingConfigTool— Full config management with supported settings listSyntheticOutputTool— Synthetic output injectionEnterPlanModeTool— Enter plan mode with UIExitPlanModeTool— Exit plan mode with V2 flowEnterWorktreeTool— Full worktree enter with UIExitWorktreeTool— Full worktree exit with UITaskOutputTool— Task output displayTaskStopTool— Stop a running task
Feature-gated tools:
CronCreateTool/CronDeleteTool/CronListTool— Cron scheduling (AGENT_TRIGGERS)RemoteTriggerTool— Full remote triggers with UI (AGENT_TRIGGERS_REMOTE)MonitorTool— MCP server monitoring (MONITOR_TOOL)SendUserFileTool— Send file to user (KAIROS)PushNotificationTool— Push notifications (KAIROS)SubscribePRTool— PR subscription (KAIROS_GITHUB_WEBHOOKS)SuggestBackgroundPRTool— Background PR (ant-only)VerifyPlanExecutionTool— Plan verificationTungstenTool— Tungsten toolWebBrowserTool— Full web browserTerminalCaptureTool— Terminal captureSnipTool— Force history snippingListPeersTool— List peers (UDS_INBOX)EmbeddedSearchTool— Embedded searchCtxInspectTool— Context inspectionWorkflowTool— Workflow scripts (WORKFLOW_SCRIPTS)
Note: Python has basic tool execution for bash, read_file, etc., but lacks per-tool UI components, prompt files, constants, and deep security validations (e.g., BashTool has 15 supporting files in npm).
7. Commands And Task Systems
Done:
- Basic local command dispatch for the Python runtime
- Inventory view of mirrored command names
- Local persistent task runtime with create/get/list/update flows
- Local todo-list replacement flow
- Local persistent plan runtime with get/update/clear flows
- Local plan-to-task sync flow
- Local dependency-aware task execution flow with next-task selection and blocked/unblocked state
- Local remote profile/runtime flow with persisted connect/disconnect state
- Local background task management for agent worker sessions
- Local ask-user runtime with queued answers, history, and slash/CLI inspection flows
- Local team runtime with persisted teams, messages, and slash/CLI inspection flows
- Local workflow runtime with manifest discovery, run history, and workflow CLI/slash flows
- Local remote trigger runtime with create/update/run flows and trigger CLI/slash flows
- Local managed git worktree runtime with session cwd switching and worktree CLI/slash flows
Missing:
- Real implementation of the larger upstream command tree (80+ commands)
- Task types:
LocalShellTask,LocalAgentTask,RemoteAgentTask,DreamTask,LocalWorkflowTask,MonitorMcpTask,InProcessTeammateTask - Task stall detection (45s threshold) and prompt detection for interactive input
- Remote agent task session URL tracking and completion checkers
- Dream/auto-consolidation task with file tracking and turn history
- Task orchestration system beyond the current local dependency-aware task runtime
- Planner / task execution parity beyond the current local plan persistence, sync, and next-task flow
- Team / collaboration command flows beyond the current local team runtime and message recording flows
- Command-specific session behaviors
- Full
src/commands/*parity (80+ command directories) - Full
src/tasks/*parity (7 task types)
8. Permissions, Hooks, And Policy
Done:
- Read-only default mode
- Write-gated mode
- Shell-gated mode
- Unsafe mode for destructive shell actions
- Local hook/policy manifest discovery
- Hook before-prompt and after-turn runtime handling
- Hook/policy tool preflight, deny, and after-tool handling
- Policy budget override loading
- Managed settings loading and reporting
- Safe environment loading for shell tool context
- Trust reporting and hook/policy slash commands
- Permission-denial runtime events for policy/tool blocks
Missing:
- Full BashTool security:
bashSecurity.ts,sedValidation.ts,sedEditParser.ts,pathValidation.ts,readOnlyValidation.ts,modeValidation.ts,commandSemantics.ts,destructiveCommandWarning.ts,shouldUseSandbox.ts→src/bash_security.py(18 validators, destructive warnings, command semantics, read-only detection, 163 tests) - Full PowerShellTool security:
powershellSecurity.ts,gitSafety.ts,clmTypes.ts - Tool-permission workflow parity (
bashPermissions.ts,powershellPermissions.ts) - Trust-gated initialization
- Hook-config management (
schemas/hooks.tswith Zod schemas) - Policy limits service (
services/policyLimits/) - Remote managed settings (
services/remoteManagedSettings/) - Full hooks and policy parity
9. MCP, Plugins, And Skills
Done:
- Placeholder mirrored package layout for plugins, skills, services, and remote subsystems
- Local manifest-backed MCP discovery
- Local MCP resource listing and reading
- MCP-backed runtime tools for local resource access
- Real MCP client support over local stdio transport
- MCP server integration for stdio child-process servers
- MCP-backed tool listing and execution over transport
Missing:
- Full MCP service (
services/mcp/— 25+ files: InProcessTransport, MCPConnectionManager, SdkControlTransport, auth, channelAllowlist, channelPermissions, client, config, elicitationHandler, envExpansion, normalization, oauthPort, officialRegistry, vscodeSdkMcp, xaa, xaaIdpLogin, etc.) - MCP server approval dialogs (
services/mcpServerApproval.tsx) - Plugin discovery, loading, and installation (
services/plugins/PluginInstallationManager.ts,pluginCliCommands.ts,pluginOperations.ts) - Bundled plugin support (
plugins/bundledPlugins.ts,plugins/bundled/) - Plugin lifecycle management
- Plugin update/cache behavior
- Skill discovery and execution (
skills/bundledSkills.ts,skills/loadSkillsDir.ts,skills/mcpSkillBuilders.ts,skills/bundled/) - Bundled skill support
- Full plugin and skill parity
10. Interactive UI / REPL / TUI
Done:
- Non-interactive CLI execution
- Basic interactive REPL-style agent chat loop
- Transcript printing for debugging
Missing:
- Interactive REPL parity (
screens/REPL.tsx) - Ink/TUI framework (
ink/— 40+ files: custom renderer, reconciler, DOM, layout engine, text wrapping, ANSI handling, focus management, selection) - Screen system (
screens/Doctor.tsx,screens/ResumeConversation.tsx) - Component library (
components/— 100+ components in 12+ subdirectories):- Message rendering: Message, MessageRow, Messages, MessageSelector, MessageResponse
- Dialogs: ApproveApiKey, AutoModeOptIn, Bridge, CostThreshold, IdeAutoConnect, MCPServerApproval
- Settings: ThemePicker, LanguagePicker, ModelPicker, OutputStylePicker
- Search: GlobalSearchDialog, QuickOpenDialog, HistorySearchDialog
- Status: AgentProgressLine, BashModeProgress, MemoryUsageIndicator, TokenWarning
- Design system, agent, team, task, skill, memory, permissions, sandbox, shell components
- Keyboard interaction parity
- Interactive status panes
- Approval UI flows
- Rich incremental rendering
- Virtual scrolling
- Copy-on-select behavior
11. Remote, Background, And Team Features
Done:
- Session save/resume on local disk
- Local manifest-backed remote profile/runtime state
- Local remote connect/disconnect session state
- Local background agent processes
- Local background attach/log/kill workflows
- Local daemon-style wrapper over background agent sessions
Missing:
- Real remote session management (
remote/— 4 files: RemoteSessionManager, SessionsWebSocket, remotePermissionBridge, sdkMessageAdapter) - Bridge subsystem (
bridge/— 30+ files: bridgeMain, bridgeApi, bridgeConfig, bridgeMessaging, bridgePermissionCallbacks, replBridge, replBridgeHandle, replBridgeTransport, sessionRunner, trustedDevice, jwtUtils, capacityWake, inboundAttachments, inboundMessages, etc.) - Direct connect subsystem (
server/createDirectConnectSession.ts,directConnectManager.ts) - Real team collaboration beyond local recording
- Shared remote state
- Upstream proxy (
upstreamproxy/upstreamproxy.ts,upstreamproxy/relay.ts)
12. Editor, Platform, And Native Integrations
Done:
- Standard shell-based local workflow
Missing:
- Voice mode (
voice/,services/voice.ts,services/voiceKeyterms.ts,services/voiceStreamSTT.ts, hooks) - VIM mode (
vim/— 5 files: motions, operators, textObjects, transitions, types) - Keybinding system (
keybindings/— 13 files: defaultBindings, loadUserBindings, match, parser, resolver, schema, template, validate, etc.) - Notification hooks (
services/notifier.ts,services/preventSleep.ts) - Native TypeScript / platform helpers (
native-ts/) - JetBrains/editor integration (
utils/jetbrains.ts,utils/ide.ts,utils/idePathConversion.ts) - Browser/native host integrations
- IDE integration hooks (useIDEIntegration, useIdeAtMentioned, useIdeSelection, useIdeLogging, useDiffInIDE, useLspPluginRecommendation)
- Platform-specific startup/shutdown logic
- Chrome extension integration
13. Services And Internal Subsystems
Done:
- Minimal internal service layer required by the current Python runtime
- Local account/auth runtime for manifest-backed profile discovery and persisted login state
Missing:
- Analytics service (
services/analytics/— 10+ files: config, Datadog, Growthbook, first-party event logger, sink, killswitch) - API service (
services/api/— 20+ files: claude client, dumpPrompts, errorUtils, filesApi, firstTokenDate, grove, logging, metricsOptOut, promptCacheBreakDetection, sessionIngress, usage, withRetry, etc.) - LSP service (
services/lsp/— 7 files: LSPClient, LSPDiagnosticRegistry, LSPServerInstance, LSPServerManager, config, manager, passiveFeedback) - Tools service (
services/tools/— 4 files: StreamingToolExecutor, toolExecution, toolHooks, toolOrchestration) - Compact service (
services/compact/— 6 files: compact, autoCompact, microCompact, apiMicrocompact, sessionMemoryCompact, compactWarningHook) - Auto-dream service (
services/autoDream/— 4 files: autoDream, config, consolidationLock, consolidationPrompt) - Agent summary service (
services/AgentSummary/) - Magic docs service (
services/MagicDocs/) - Session memory service (
services/SessionMemory/) - Prompt suggestion service (
services/PromptSuggestion/) - Extract memories service (
services/extractMemories/) - Diagnostic tracking service (
services/diagnosticTracking.ts) - OAuth service (
services/oauth/— 5 files) - Rate limiting (
services/claudeAiLimits.ts,services/rateLimitMessages.ts, etc.) - Settings sync (
services/settingsSync/) - Tips service (
services/tips/) - Tool use summary service (
services/toolUseSummary/) - VCR playback (
services/vcr.ts) - Internal/container logging (
services/internalLogging.ts) - Plugin installation management (
services/plugins/)
14. State Management
Done:
- Session state via
AgentSessionStatedataclass - Basic session persistence
Missing:
- Zustand store (
state/AppStateStore.ts,state/store.ts) - Store selectors (
state/selectors.ts) - State change callbacks (
state/onChangeAppState.ts) - React context providers (
state/AppState.tsx)
15. React Hooks (84+ hooks in src/hooks/)
Not applicable for Python (no React TUI), but these represent features needing alternative implementations:
- File suggestions and unified suggestions
- Remote session / SSH / direct connect hooks
- Input buffer, text input, vim input, typeahead, search input, paste handling
- Arrow key history, history search, background task navigation
- Main loop model selection, assistant history, merged clients/commands/tools
- Tool permission checking, cancel request, manage plugins
- Global/command keybindings, exit handling, double-press detection
- Terminal size, virtual scroll, copy-on-select
- Voice recording, voice integration
- IDE integration, @mention, selection, diff-in-IDE
- Settings management, dynamic config
- Timeout, elapsed time, scheduled tasks, delayed notifications
- Prompt suggestion, update notification, feature hints
- Queue processor, command queue
- Memory usage, away summary, teleport resume
- Diff data, turn diffs
- Task list watcher, tasks v2, PR status
- Session backgrounding, swarm initialization/permission
- API key verification, mailbox bridge, inbox poller
16. Utilities (200+ files in src/utils/)
Done:
- Basic file operations in tool implementations
- Basic git status snapshot
- Basic shell/subprocess handling
Missing major utility categories:
- Shell utilities (
utils/bash/,utils/shell/,Shell.ts,ShellCommand.ts) - Git operations (
utils/git.ts,utils/gitDiff.ts,utils/gitSettings.ts,utils/commitAttribution.ts) - File operations (
utils/file.ts,utils/fileRead.ts,utils/fileHistory.ts,utils/fileStateCache.ts,utils/fsOperations.ts,utils/ripgrep.ts,utils/glob.ts) - AI/Model utilities (
utils/modelCost.ts,utils/model/,utils/context.ts,utils/queryContext.ts) - Config/Settings (
utils/config.ts,utils/settings/) - Message handling (
utils/messages.ts,utils/messages/,utils/messageQueueManager.ts) - API/Network (
utils/api.ts,utils/http.ts,utils/proxy.ts,utils/auth.ts) - Session management (
utils/sessionStorage.ts,utils/sessionState.ts,utils/sessionStart.ts,utils/sessionRestore.ts) - Plugin/Skill utilities (
utils/plugins/,utils/skills/) - Memory/Context (
utils/memory/,utils/claudemd.ts,utils/contextAnalysis.ts) - IDE integration (
utils/ide.ts,utils/jetbrains.ts) - Platform/OS (
utils/platform.ts,utils/terminal.ts,utils/systemDirectories.ts) - Debugging (
utils/debug.ts,utils/diagLogs.ts,utils/log.ts,utils/profilerBase.ts) - Telemetry (
utils/telemetry/) - Deep link utilities (
utils/deepLink/)
17. Coordinator And Buddy
Missing:
- Coordinator mode (
coordinator/coordinatorMode.ts— agent tool filtering and async agent allowlist) - Buddy/companion system (
buddy/— 6 files: CompanionSprite, companion procedural generation, personality prompts, sprites, types, notification UI)
18. Migrations
Missing:
- Data/config migration system (
migrations/— 11 migration scripts):- Model migrations: migrateFennecToOpus, migrateLegacyOpusToCurrent, migrateOpusToOpus1m, migrateSonnet1mToSonnet45, migrateSonnet45ToSonnet46
- Feature migrations: migrateAutoUpdatesToSettings, migrateBypassPermissionsAcceptedToSettings, migrateEnableAllProjectMcpServersToSettings, migrateReplBridgeEnabledToRemoteControlAtStartup
- Config resets: resetAutoModeOptInForDefaultOffer, resetProToOpusDefault
19. Type Definitions
Missing:
- Full type system from
types/(command.ts, hooks.ts, ids.ts, logs.ts, permissions.ts, plugin.ts, textInputTypes.ts, generated/)
20. Mirrored Workspace Versus Working Runtime
Working Python runtime today (21,193 lines across 51 source files, 10,480 lines across 37 test files):
src/main.py(1,353 lines)src/agent_runtime.py(3,664 lines)src/agent_tools.py(2,994 lines)src/agent_prompting.py(390 lines)src/agent_context.py(459 lines)src/agent_context_usage.py(356 lines)src/agent_session.py(718 lines)src/agent_slash_commands.py(633 lines)src/agent_manager.py(296 lines)src/agent_plugin_cache.py(154 lines)src/agent_types.py(193 lines)src/account_runtime.py(470 lines)src/ask_user_runtime.py(320 lines)src/background_runtime.py(371 lines)src/config_runtime.py(296 lines)src/hook_policy.py(339 lines)src/mcp_runtime.py(880 lines)src/openai_compat.py(413 lines)src/permissions.py(20 lines)src/plan_runtime.py(396 lines)src/plugin_runtime.py(654 lines)src/query_engine.py(655 lines)src/remote_runtime.py(571 lines)src/remote_trigger_runtime.py(371 lines)src/search_runtime.py(606 lines)src/session_store.py(295 lines)src/task.py(130 lines)src/task_runtime.py(595 lines)src/team_runtime.py(386 lines)src/tokenizer_runtime.py(202 lines)src/workflow_runtime.py(319 lines)src/worktree_runtime.py(448 lines)- Plus 19 supporting modules
Mirrored / scaffold areas needing real implementation:
src/commands.py— currently minimal dispatch, needs full command treesrc/tools.py— reference-data based tool loading, needs real per-tool implementationssrc/query_engine.py— facade layer, needs full QueryEngine.ts paritysrc/runtime.py— routing layer, needs full runtime parity- Remaining inventory surfaces under
src/reference_data/*
High-Priority Next Steps
Tier 1 — Core Feature Gaps (highest user impact)
- Full BashTool security parity (sed validation, path validation, sandbox, destructive command warnings, command semantics) →
src/bash_security.py - LSP tool integration for code intelligence
- Full AgentTool with built-in agent types (explore, general-purpose, verification, plan)
- Auto-compact and context collapse from
query.ts - Full compact service (autoCompact, microCompact, sessionMemoryCompact)
- Interactive REPL improvements
Tier 2 — Important Feature Gaps
- SkillTool with bundled skills
- Full MCP service parity (auth, permissions, config, registry)
- Plugin discovery, loading, and installation
- Real remote session management (WebSocket, bridge)
- Full command tree implementation (80+ commands)
- Migration system for config/model upgrades
- Token budget calculations
Tier 3 — Nice-to-Have Features
- TUI/Ink component library
- Voice mode
- VIM mode and keybinding system
- IDE integrations (JetBrains, VS Code)
- Chrome extension integration
- Buddy/companion system
- Analytics/telemetry
- Coordinator mode
- Feature flag system (Growthbook)
Tier 4 — Platform/Enterprise Features
- Full bridge subsystem (30+ files)
- Upstream proxy
- Direct connect server
- OAuth service
- Settings sync
- Rate limiting and policy limits
- Dream/auto-consolidation service