VTCode: A Rust TUI Coding Agent That Aggressively Trims Context with AST-Level Chunking

VTCode is an open-source Rust TUI coding agent that takes a different approach to context management: instead of dumping your entire directory tree into every prompt, it aggressively trims context using AST-level chunking. Built with a focus on token efficiency and security, it uses ripgrep and ast-grep to extract only structurally relevant code chunks, dropping prompt size sharply on refactor tasks.
Key Features
- AST-level context extraction: Uses ripgrep + ast-grep to send only relevant code chunks to the model, reducing token burn.
- Explicit token budget tracking: The agent monitors and manages token usage, preventing context overflow.
- Sandboxing for command execution: macOS Seatbelt + Linux Landlock + seccomp + tree-sitter-bash validation on every model-generated command. The agent stays within the workspace.
- Custom OpenAI-compatible providers: Easily plug in any third-party endpoint with a single config block.
Running with DeepSeek V4 Flash
The author paired VTCode with DeepSeek V4 Flash via the Atlas Cloud endpoint for lower latency during peak hours. Configuration is straightforward:
[agent]
provider = "atlas"
default_model = "deepseek-ai/deepseek-v4-flash"
[[custom_providers]]
name = "atlas"
base_url = "https://api.atlascloud.ai/v1"
api_key_env = "ATLAS_API_KEY"
model = "deepseek-ai/deepseek-v4-flash"
The agent natively supports OpenAI-compatible providers, so any similar host works — the author just used Atlas because they already had a key.
Who It's For
Developers who want a lean, context-aware TUI agent for coding tasks without burning tokens on irrelevant files or worrying about command security.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Claude Code Plan Mode Reduces Redo Rate from 40% to Near Zero
A developer tracked 30+ coding sessions with Claude Code and found that skipping Plan Mode resulted in redoing tasks from scratch 40% of the time. With Plan Mode, the redo rate dropped to basically zero, with one feature taking 17 minutes total versus 35+ minutes without planning.

OpenClaw Multi-Agent Book Writing Skill Released
A multi-agent book writing system built on OpenClaw has been released as a skill, featuring DeepWiki MCP connection, GLM image generation for illustrations, budget estimation, and chapter-level revision. Two chapters of the OpenClaw Paradigm Book have been updated using this tool.

LogClaw: Open-Source AI SRE for Auto-Ticketing from Logs
LogClaw is an open-source log intelligence platform that runs on Kubernetes, ingests logs via OpenTelemetry, detects anomalies using signal-based composite scoring, and automatically creates tickets with root cause analysis in about 90 seconds.

Phalanx CLI coordinates multiple AI agents for automated code-review cycles
A developer built Phalanx, a CLI tool that coordinates AI agents from different providers: Codex handles coding, Claude Opus performs code review, and Claude Sonnet orchestrates the loop. A companion tool called Codebones compresses repositories to structural maps to reduce token usage.