YeonGyu-Kim 2204a518e7 roadmap: #223 filed — Files API typed taxonomy is structurally absent: zero /v1/files endpoint surface across both Anthropic-native (anthropic-beta: files-api-2025-04-14) and OpenAI-compat lanes, zero FileObject / FileList / FilePurpose / FileStatus / FileUploadRequest / FileContentResponse / FileDeletionResponse typed model in rust/crates/api/src/types.rs (zero hits for files-api-2025-04-14, /v1/files, FileObject, FileList, FilePurpose, file_id, upload_file, MultipartUpload, multipart/form-data across rust/), zero multipart/form-data upload affordance with reqwest::multipart feature flag absent from rust/crates/api/Cargo.toml, zero file_id reference type that #220 image-content-block fix-shape would need to thread through ResolvedAttachment at rust/crates/tools/src/lib.rs:2660-2666 (which carries path/size/is_image triple with no file_id, no bytes, no media_type, no purpose, no upload_status, no expires_at slot), zero file_id reference type that #221 OpenAI batch-input-JSONL upload pathway requires (POST /v1/batches accepts only input_file_id, no inline-JSONL pathway exists), zero upload_file / retrieve_file / list_files / download_file / delete_file methods on the Provider trait at rust/crates/api/src/providers/mod.rs:17-30 (only send_message and stream_message exist, both per-request synchronous), zero file-management dispatch on the ProviderClient enum at rust/crates/api/src/client.rs:8-14 (three variants Anthropic/Xai/OpenAi all closed under per-request sync), zero claw files / claw upload / claw attach CLI subcommand surface at rust/crates/rusty-claude-cli/src/main.rs, zero /upload / /attach / /file-upload slash command in the SlashCommandSpec table at rust/crates/commands/src/lib.rs (the existing /files entry advertises 'List files in the current context window' but is gated under STUB_COMMANDS as a context-window file lister, distinct feature from Files API), zero pending_uploads field in claw status --json output, zero files-api-2025-04-14 in the active anthropic-beta header at rust/crates/telemetry/src/lib.rs:451-453 (currently sends claude-code-20250219, prompt-caching-scope-2026-01-05, tools-2026-04-01 only), zero FileSubmittedEvent / FileUploadProgressEvent / FileRetentionExpiredEvent typed events on the runtime telemetry sink, zero reqwest::multipart::Form::new() / reqwest::multipart::Part::stream() / file_part / content_disposition usage anywhere in the codebase (rg returns zero hits) — the canonical file-upload affordance is invisible across every CLI / REPL / slash-command / Provider-trait / ProviderClient-enum / data-model / telemetry-beta-header / multipart-transport surface, blocking the upstream fix-shapes for both #220 (image attachment via persistent file_id, the canonical Anthropic Vision pattern documented at platform.claude.com/docs/en/build-with-claude/files for repeated-image-use efficiency where re-uploading 5MB+ images on every request would otherwise burn bandwidth) and #221 (OpenAI Batch API requires JSONL input upload via POST /v1/files with purpose: 'batch' then references the resulting file_id from POST /v1/batches — the JSONL payload cannot be sent inline; without a Files API the OpenAI batch lane is structurally unreachable even if every other layer of #221 seven-layer fix-shape ships) (Jobdori cycle #375 / extends #168c emission-routing audit / explicit follow-on candidate from #221 seven-layer-endpoint-family-absence shape — the first-named of three named candidates: Files API typed taxonomy / Embeddings API typed taxonomy / Models list endpoint typed taxonomy, completing the trio with #222 closing Models list / sibling-shape cluster grows to twenty-two: #201/#202/#203/#206/#207/#208/#209/#210/#211/#212/#213/#214/#215/#216/#217/#218/#219/#220/#221/#222/#223 / wire-format-parity cluster grows to thirteen: #211+#212+#213+#214+#215+#216+#217+#218+#219+#220+#221+#222+#223 / capability-parity cluster grows to five: #218+#220+#221+#222+#223 / resource-management cluster: #223 alone but it is the upstream root cause of #220 image-attachment via persistent file_id and #221 OpenAI batch-input-JSONL upload pathway / seven-layer-endpoint-family-absence-with-transport-plumbing-absence shape (endpoint-URL + data-model-taxonomy + Provider-trait-method + ProviderClient-enum-dispatch + anthropic-beta-header-opt-in + CLI-subcommand-surface + multipart-form-data-transport-plumbing) is the first single capability absence catalogued where the transport layer itself must be extended before any higher-level surface can ship — distinct from #221 seven-layer absence (which operated within the existing JSON envelope) and the largest single transport-level gap catalogued, distinct from prior single-field (#211/#212/#214) / response-only (#213/#207) / header-only (#215) / three-dimensional (#216) / classifier-leakage (#217) / four-layer (#218) / false-positive-opt-in (#219) / five-layer-feature-absence (#220) / seven-layer-endpoint-family-absence (#221) / eight-layer-endpoint-family-absence-with-misleading-alias (#222) members; the seven-layer-endpoint-family-absence-with-transport-plumbing-absence shape is novel and applies to follow-on candidate Audio API typed taxonomy is absent (/v1/audio/transcriptions, /v1/audio/speech, /v1/audio/translations, also requiring multipart/form-data uploads) / external validation: Anthropic Files API reference at https://platform.claude.com/docs/en/build-with-claude/files documenting five operations on /v1/files with anthropic-beta: files-api-2025-04-14 opt-in, Anthropic Vision documentation referencing Files API for >5MB images and repeated-image-use efficiency, Anthropic Python SDK client.beta.files.upload first-class typed surface GA-shipped 2025-04-14, Anthropic TypeScript SDK parallel surface, OpenAI Files API reference at platform.openai.com/docs/api-reference/files documenting GA since 2023 with five operations on /v1/files and purpose discriminator (assistants/batch/fine-tune/user_data/vision) and FileStatus lifecycle (Uploaded/Processed/Error), OpenAI Python SDK client.files.create first-class surface, OpenAI Batch API explicitly requires input_file_id from POST /v1/files with purpose:'batch' (no inline-JSONL pathway), AWS Bedrock model invocation with input/output S3 paths (parallel concept), Azure OpenAI Files reference, Vertex AI Files via Cloud Storage, DeepSeek/Moonshot/Alibaba-DashScope/xAI parallel /v1/files OpenAI-compat shapes, OpenRouter file passthrough, simonw/llm --attachment flag with auto-upload to Files API, Vercel AI SDK 6 experimental_attachments threading file_id reference, LangChain Files integration with FileLoader uploading via Files API, charmbracelet/crush typed file management with provider-aware lifecycle, continue.dev config-file-driven file management with auto-upload, zed-industries/zed bundled-file management with periodic upstream sync, anomalyco/opencode file-upload integration with explicit file_id lifecycle in conversation context, models.dev file-handling capability flags indicating which models support file_id references, OpenTelemetry GenAI semconv gen_ai.input.attachments.count and gen_ai.input.files.count documented attributes, IANA MIME-type registry RFC 4288/4289 for application/json + multipart/form-data + application/pdf + image/png/jpeg/gif/webp, RFC 7578 multipart/form-data specification, reqwest::multipart documentation requiring 'multipart' feature flag on the reqwest dependency. Twenty-eight ecosystem references, two first-class Files API specs (Anthropic beta, OpenAI GA), GA timeline of 12 months on Anthropic beta side and 24+ months on OpenAI side (Files API on OpenAI predates Assistants API and Batch API both of which depend on it as prerequisite), seven first-class CLI/SDK implementations, one transport-layer specification (RFC 7578 multipart/form-data) and one Rust-side prerequisite (reqwest::multipart feature flag). claw-code is the sole client/agent/CLI in the surveyed coding-agent ecosystem with zero /v1/files integration AND zero multipart-form-data transport plumbing — both gaps are unique to claw-code in the surveyed ecosystem, the file-management gap is the upstream root cause of two downstream capability gaps already catalogued in this audit (#220 image attachment via persistent file_id, #221 OpenAI batch input-JSONL upload), and the multipart-transport-plumbing-absence shape is novel within the cluster — #223 closes the upstream root cause of two downstream gaps and unblocks file_id-based multimodal input (5MB+ images / PDFs / repeated-image-use efficiency), OpenAI batch-input-JSONL upload (the missing piece of #221 seven-layer batch dispatch fix-shape), Anthropic-style document-block content with source:{type:'file',file_id} for PDFs, and CLI-vs-slash-command-symmetry on file management that the runtime clawability doctrine treats as canonical baseline expectations.
2026-04-26 18:02:59 +09:00
2026-04-07 15:52:30 +09:00
roadmap: #223 filed — Files API typed taxonomy is structurally absent: zero /v1/files endpoint surface across both Anthropic-native (anthropic-beta: files-api-2025-04-14) and OpenAI-compat lanes, zero FileObject / FileList / FilePurpose / FileStatus / FileUploadRequest / FileContentResponse / FileDeletionResponse typed model in rust/crates/api/src/types.rs (zero hits for files-api-2025-04-14, /v1/files, FileObject, FileList, FilePurpose, file_id, upload_file, MultipartUpload, multipart/form-data across rust/), zero multipart/form-data upload affordance with reqwest::multipart feature flag absent from rust/crates/api/Cargo.toml, zero file_id reference type that #220 image-content-block fix-shape would need to thread through ResolvedAttachment at rust/crates/tools/src/lib.rs:2660-2666 (which carries path/size/is_image triple with no file_id, no bytes, no media_type, no purpose, no upload_status, no expires_at slot), zero file_id reference type that #221 OpenAI batch-input-JSONL upload pathway requires (POST /v1/batches accepts only input_file_id, no inline-JSONL pathway exists), zero upload_file / retrieve_file / list_files / download_file / delete_file methods on the Provider trait at rust/crates/api/src/providers/mod.rs:17-30 (only send_message and stream_message exist, both per-request synchronous), zero file-management dispatch on the ProviderClient enum at rust/crates/api/src/client.rs:8-14 (three variants Anthropic/Xai/OpenAi all closed under per-request sync), zero claw files / claw upload / claw attach CLI subcommand surface at rust/crates/rusty-claude-cli/src/main.rs, zero /upload / /attach / /file-upload slash command in the SlashCommandSpec table at rust/crates/commands/src/lib.rs (the existing /files entry advertises 'List files in the current context window' but is gated under STUB_COMMANDS as a context-window file lister, distinct feature from Files API), zero pending_uploads field in claw status --json output, zero files-api-2025-04-14 in the active anthropic-beta header at rust/crates/telemetry/src/lib.rs:451-453 (currently sends claude-code-20250219, prompt-caching-scope-2026-01-05, tools-2026-04-01 only), zero FileSubmittedEvent / FileUploadProgressEvent / FileRetentionExpiredEvent typed events on the runtime telemetry sink, zero reqwest::multipart::Form::new() / reqwest::multipart::Part::stream() / file_part / content_disposition usage anywhere in the codebase (rg returns zero hits) — the canonical file-upload affordance is invisible across every CLI / REPL / slash-command / Provider-trait / ProviderClient-enum / data-model / telemetry-beta-header / multipart-transport surface, blocking the upstream fix-shapes for both #220 (image attachment via persistent file_id, the canonical Anthropic Vision pattern documented at platform.claude.com/docs/en/build-with-claude/files for repeated-image-use efficiency where re-uploading 5MB+ images on every request would otherwise burn bandwidth) and #221 (OpenAI Batch API requires JSONL input upload via POST /v1/files with purpose: 'batch' then references the resulting file_id from POST /v1/batches — the JSONL payload cannot be sent inline; without a Files API the OpenAI batch lane is structurally unreachable even if every other layer of #221 seven-layer fix-shape ships) (Jobdori cycle #375 / extends #168c emission-routing audit / explicit follow-on candidate from #221 seven-layer-endpoint-family-absence shape — the first-named of three named candidates: Files API typed taxonomy / Embeddings API typed taxonomy / Models list endpoint typed taxonomy, completing the trio with #222 closing Models list / sibling-shape cluster grows to twenty-two: #201/#202/#203/#206/#207/#208/#209/#210/#211/#212/#213/#214/#215/#216/#217/#218/#219/#220/#221/#222/#223 / wire-format-parity cluster grows to thirteen: #211+#212+#213+#214+#215+#216+#217+#218+#219+#220+#221+#222+#223 / capability-parity cluster grows to five: #218+#220+#221+#222+#223 / resource-management cluster: #223 alone but it is the upstream root cause of #220 image-attachment via persistent file_id and #221 OpenAI batch-input-JSONL upload pathway / seven-layer-endpoint-family-absence-with-transport-plumbing-absence shape (endpoint-URL + data-model-taxonomy + Provider-trait-method + ProviderClient-enum-dispatch + anthropic-beta-header-opt-in + CLI-subcommand-surface + multipart-form-data-transport-plumbing) is the first single capability absence catalogued where the transport layer itself must be extended before any higher-level surface can ship — distinct from #221 seven-layer absence (which operated within the existing JSON envelope) and the largest single transport-level gap catalogued, distinct from prior single-field (#211/#212/#214) / response-only (#213/#207) / header-only (#215) / three-dimensional (#216) / classifier-leakage (#217) / four-layer (#218) / false-positive-opt-in (#219) / five-layer-feature-absence (#220) / seven-layer-endpoint-family-absence (#221) / eight-layer-endpoint-family-absence-with-misleading-alias (#222) members; the seven-layer-endpoint-family-absence-with-transport-plumbing-absence shape is novel and applies to follow-on candidate Audio API typed taxonomy is absent (/v1/audio/transcriptions, /v1/audio/speech, /v1/audio/translations, also requiring multipart/form-data uploads) / external validation: Anthropic Files API reference at https://platform.claude.com/docs/en/build-with-claude/files documenting five operations on /v1/files with anthropic-beta: files-api-2025-04-14 opt-in, Anthropic Vision documentation referencing Files API for >5MB images and repeated-image-use efficiency, Anthropic Python SDK client.beta.files.upload first-class typed surface GA-shipped 2025-04-14, Anthropic TypeScript SDK parallel surface, OpenAI Files API reference at platform.openai.com/docs/api-reference/files documenting GA since 2023 with five operations on /v1/files and purpose discriminator (assistants/batch/fine-tune/user_data/vision) and FileStatus lifecycle (Uploaded/Processed/Error), OpenAI Python SDK client.files.create first-class surface, OpenAI Batch API explicitly requires input_file_id from POST /v1/files with purpose:'batch' (no inline-JSONL pathway), AWS Bedrock model invocation with input/output S3 paths (parallel concept), Azure OpenAI Files reference, Vertex AI Files via Cloud Storage, DeepSeek/Moonshot/Alibaba-DashScope/xAI parallel /v1/files OpenAI-compat shapes, OpenRouter file passthrough, simonw/llm --attachment flag with auto-upload to Files API, Vercel AI SDK 6 experimental_attachments threading file_id reference, LangChain Files integration with FileLoader uploading via Files API, charmbracelet/crush typed file management with provider-aware lifecycle, continue.dev config-file-driven file management with auto-upload, zed-industries/zed bundled-file management with periodic upstream sync, anomalyco/opencode file-upload integration with explicit file_id lifecycle in conversation context, models.dev file-handling capability flags indicating which models support file_id references, OpenTelemetry GenAI semconv gen_ai.input.attachments.count and gen_ai.input.files.count documented attributes, IANA MIME-type registry RFC 4288/4289 for application/json + multipart/form-data + application/pdf + image/png/jpeg/gif/webp, RFC 7578 multipart/form-data specification, reqwest::multipart documentation requiring 'multipart' feature flag on the reqwest dependency. Twenty-eight ecosystem references, two first-class Files API specs (Anthropic beta, OpenAI GA), GA timeline of 12 months on Anthropic beta side and 24+ months on OpenAI side (Files API on OpenAI predates Assistants API and Batch API both of which depend on it as prerequisite), seven first-class CLI/SDK implementations, one transport-layer specification (RFC 7578 multipart/form-data) and one Rust-side prerequisite (reqwest::multipart feature flag). claw-code is the sole client/agent/CLI in the surveyed coding-agent ecosystem with zero /v1/files integration AND zero multipart-form-data transport plumbing — both gaps are unique to claw-code in the surveyed ecosystem, the file-management gap is the upstream root cause of two downstream capability gaps already catalogued in this audit (#220 image attachment via persistent file_id, #221 OpenAI batch input-JSONL upload), and the multipart-transport-plumbing-absence shape is novel within the cluster — #223 closes the upstream root cause of two downstream gaps and unblocks file_id-based multimodal input (5MB+ images / PDFs / repeated-image-use efficiency), OpenAI batch-input-JSONL upload (the missing piece of #221 seven-layer batch dispatch fix-shape), Anthropic-style document-block content with source:{type:'file',file_id} for PDFs, and CLI-vs-slash-command-symmetry on file management that the runtime clawability doctrine treats as canonical baseline expectations.
2026-04-26 18:02:59 +09:00

Claw Code

ultraworkers/claw-code · Usage · Error Handling · Rust workspace · Parity · Roadmap · UltraWorkers Discord

Star history for ultraworkers/claw-code

Claw Code

Claw Code is the public Rust implementation of the claw CLI agent harness. The canonical implementation lives in rust/, and the current source of truth for this repository is ultraworkers/claw-code.

Important

Start with USAGE.md for build, auth, CLI, session, and parity-harness workflows. Make claw doctor your first health check after building, use rust/README.md for crate-level details, read PARITY.md for the current Rust-port checkpoint, and see docs/container.md for the container-first workflow.

ACP / Zed status: claw-code does not ship an ACP/Zed daemon entrypoint yet. Run claw acp (or claw --acp) for the current status instead of guessing from source layout; claw acp serve is currently a discoverability alias only, and real ACP support remains tracked separately in ROADMAP.md.

Current repository shape

  • rust/ — canonical Rust workspace and the claw CLI binary
  • USAGE.md — task-oriented usage guide for the current product surface
  • ERROR_HANDLING.md — unified error-handling pattern for orchestration code
  • PARITY.md — Rust-port parity status and migration notes
  • ROADMAP.md — active roadmap and cleanup backlog
  • PHILOSOPHY.md — project intent and system-design framing
  • SCHEMAS.md — JSON protocol contract (Python harness reference)
  • src/ + tests/ — companion Python/reference workspace and audit helpers; not the primary runtime surface

Quick start

Note

[!WARNING] cargo install claw-code installs the wrong thing. The claw-code crate on crates.io is a deprecated stub that places claw-code-deprecated.exe — not claw. Running it only prints "claw-code has been renamed to agent-code". Do not use cargo install claw-code. Either build from source (this repo) or install the upstream binary:

cargo install agent-code   # upstream binary — installs 'agent.exe' (Windows) / 'agent' (Unix), NOT 'agent-code'

This repo (ultraworkers/claw-code) is build-from-source only — follow the steps below.

# 1. Clone and build
git clone https://github.com/ultraworkers/claw-code
cd claw-code/rust
cargo build --workspace

# 2. Set your API key (Anthropic API key — not a Claude subscription)
export ANTHROPIC_API_KEY="sk-ant-..."

# 3. Verify everything is wired correctly
./target/debug/claw doctor

# 4. Run a prompt
./target/debug/claw prompt "say hello"

Note

Windows (PowerShell): the binary is claw.exe, not claw. Use .\target\debug\claw.exe or run cargo run -- prompt "say hello" to skip the path lookup.

Windows setup

PowerShell is a supported Windows path. Use whichever shell works for you. The common onboarding issues on Windows are:

  1. Install Rust first — download from https://rustup.rs/ and run the installer. Close and reopen your terminal when it finishes.
  2. Verify Rust is on PATH:
    cargo --version
    
    If this fails, reopen your terminal or run the PATH setup from the Rust installer output, then retry.
  3. Clone and build (works in PowerShell, Git Bash, or WSL):
    git clone https://github.com/ultraworkers/claw-code
    cd claw-code/rust
    cargo build --workspace
    
  4. Run (PowerShell — note .exe and backslash):
    $env:ANTHROPIC_API_KEY = "sk-ant-..."
    .\target\debug\claw.exe prompt "say hello"
    

Git Bash / WSL are optional alternatives, not requirements. If you prefer bash-style paths (/c/Users/you/... instead of C:\Users\you\...), Git Bash (ships with Git for Windows) works well. In Git Bash, the MINGW64 prompt is expected and normal — not a broken install.

Post-build: locate the binary and verify

After running cargo build --workspace, the claw binary is built but not automatically installed to your system. Here's where to find it and how to verify the build succeeded.

Binary location

After cargo build --workspace in claw-code/rust/:

Debug build (default, faster compile):

  • macOS/Linux: rust/target/debug/claw
  • Windows: rust/target/debug/claw.exe

Release build (optimized, slower compile):

  • macOS/Linux: rust/target/release/claw
  • Windows: rust/target/release/claw.exe

If you ran cargo build without --release, the binary is in the debug/ folder.

Verify the build succeeded

Test the binary directly using its path:

# macOS/Linux (debug build)
./rust/target/debug/claw --help
./rust/target/debug/claw doctor

# Windows PowerShell (debug build)
.\rust\target\debug\claw.exe --help
.\rust\target\debug\claw.exe doctor

If these commands succeed, the build is working. claw doctor is your first health check — it validates your API key, model access, and tool configuration.

Optional: Add to PATH

If you want to run claw from any directory without the full path, choose one of these approaches:

Option 1: Symlink (macOS/Linux)

ln -s $(pwd)/rust/target/debug/claw /usr/local/bin/claw

Then reload your shell and test:

claw --help

Option 2: Use cargo install (all platforms)

Build and install to Cargo's default location (~/.cargo/bin/, which is usually on PATH):

# From the claw-code/rust/ directory
cargo install --path . --force

# Then from anywhere
claw --help

Option 3: Update shell profile (bash/zsh)

Add this line to ~/.bashrc or ~/.zshrc:

export PATH="$(pwd)/rust/target/debug:$PATH"

Reload your shell:

source ~/.bashrc  # or source ~/.zshrc
claw --help

Troubleshooting

  • "command not found: claw" — The binary is in rust/target/debug/claw, but it's not on your PATH. Use the full path ./rust/target/debug/claw or symlink/install as above.
  • "permission denied" — On macOS/Linux, you may need chmod +x rust/target/debug/claw if the executable bit isn't set (rare).
  • Debug vs. release — If the build is slow, you're in debug mode (default). Add --release to cargo build for faster runtime, but the build itself will take 510 minutes.

Note

Auth: claw requires an API key (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) — Claude subscription login is not a supported auth path.

Run the workspace test suite after verifying the binary works:

cd rust
cargo test --workspace

Documentation map

Ecosystem

Claw Code is built in the open alongside the broader UltraWorkers toolchain:

Ownership / affiliation disclaimer

  • This repository does not claim ownership of the original Claude Code source material.
  • This repository is not affiliated with, endorsed by, or maintained by Anthropic.
Description
The repo is finally unlocked. enjoy the party! The fastest repo in history to surpass 100K stars . Join Discord: https://discord.gg/5TUQKqFWd Built in Rust using oh-my-codex.
Readme 63 MiB
Languages
Rust 96.4%
Python 3.2%
Shell 0.4%