Autonomous coding agent with structured task memory, role modes, and stage pipeline — right in your IDE.
Meet TAO·CODER — an AI coding agent that doesn't just generate code: it operates in role modes, follows explicit task stages, and stores context in structured external memory rather than an ever-growing chat history.
TAO·CODER replaces linear dialogue history with a managed pipeline of bounded prompts, an update cycle, and strict tool permissions at each stage.
✨ Key Innovations
🎭 Role Modes
TAO·CODER switches between specialized role modes, each with its own stages, tool sets, and contracts:
| Mode | Purpose | Stages |
|---|---|---|
| Architect | Architecture design, writing documents | architecture_discussion → architecture_docs |
| Developer | Development and refactoring | clarification → data_collection → development → audit → report |
| Ops | Operational tasks: deploy, monitor, rollback | ops_diagnosis → ops_change → ops_validation → ops_escalation |
| Debug | E2E testing, debugging and fixing bugs | debug_setup → debug_environment → debug_execution → debug_fix → debug_validation |
| Free | Quick edits without formal stages | (stage machine disabled) |
Each mode creates a separate task with its own Task Context. Switching modes creates a new task with context transfer via a handoff bundle.
🧩 Structured Task Stages
Every task in Developer mode flows through a clear, trackable pipeline:
Clarification → Data Collection → Development → Audit → Report
- Clarification — TAO·CODER asks questions to understand your goal and writes it into the Task Context before touching code
- Data Collection — Reads files, searches patterns, explores the codebase; write tools are locked
- Development — Writes and edits code with full tool access
- Audit — Reviews changes, validates against acceptance criteria
- Report — Presents a clear summary of what was done
Each stage has strict tool permissions — write access is only granted during Development. This prevents accidental modifications during analysis.
🧠 External Task Memory (Task Context Kernel)
TAO·CODER stores task context not in chat history, but in structured persistent storage on disk. The Task Context contains:
- Task specification and acceptance criteria
- Implementation plan with progress tracking
- Code references (anchored to specific lines and git hashes)
- Decisions and hypotheses
- Negative knowledge ("this approach doesn't work because...")
- Notes and handoff summaries for team collaboration
Chat history remains bounded — no more than 10–15 recent turns. The update-cycle periodically extracts new facts from the dialogue tail and stores them in the Task Context, after which old turns are archived.
🔄 Update-cycle (Smart Memory)
The only mechanism for transferring information from dialogue to persistent memory:
- At each LLM request, the system checks if enough new turns have accumulated
- If so, an update-cycle runs: the LLM analyzes recent turns and extracts facts (refs, decisions, hypotheses, negative knowledge)
- Extracted data is merged into the Task Context on disk
- Chat history is trimmed to bounded size
This is the core of the agent's "smart memory": without the update-cycle, chat history would grow uncontrollably.
⚡ Flash Models
TAO·CODER solves complex tasks on cheap flash models — this is made possible by the bounded prompt + update-cycle + Task Context Kernel architecture: the context never grows uncontrollably, allowing efficient work with any task without routing them to expensive frontier models.
🔧 TaoCoder Tool Ecosystem
- Stage transitions — Explicit promotion via
taocoder_set_stagewith evidence tracking - Handoff system — Controlled cross-domain transfers between tasks (Architect → Developer, Ops → Developer, Debug → Developer)
- Update-cycle — Automatic extraction of facts from dialogue into persistent memory
- Exit criteria — Each stage has a preset checklist; transition is only possible when all criteria are met
- Command Safety Policy — Deterministic classification of commands as safe/dangerous/unknown instead of LLM-gated approval
🔄 Key Innovations in Detail
TAO·CODER builds upon established patterns in AI-assisted coding, while introducing significant architectural advances in the following areas:
📊 Cost Tracking
Reworked API cost tracking logic: the system accounts for each LLM call with breakdown by task stage and role mode. The Task Context Kernel stores aggregated token and cost statistics, allowing transparent assessment of the bounded prompt architecture's cost efficiency.
🛠️ Code Reading and Editing Tools
The read_file, replace_in_file, write_to_file, and search_files tools have been significantly enhanced:
read_file— Repeated read check support, preventing duplicate content loading when nothing changedreplace_in_file— Multiple SEARCH/REPLACE blocks in a single call, correct conflict resolutionsearch_in_file— A new tool for searching inside a single file with compact context- All tools return the final file state after auto-formatting
⚙️ Prompt Management via Settings
The system uses stage prompts and role mode prompts that can be configured through the extension's settings interface. In the original implementation, the system prompt is hardcoded; TaoCoder allows flexible agent behavior configuration at each stage.
Other Improvements
Numerous other enhancements, including bounded prompt architecture, update-cycle, external Task Context Kernel memory, role modes with separate stage machines, Command Safety Policy, handoff system for cross-domain task transfers, and improved README_AI.md integration.
🚀 How It Works
-
Tell TAO·CODER your goal — Describe what you want to achieve. Attach screenshots, error logs, or reference files.
-
TAO·CODER clarifies first — In the Clarification stage, it analyzes your codebase, reads
README_AI.md(the project's living document), asks clarifying questions, and writes the spec and acceptance criteria into the Task Context. -
Collects data — In the Data Collection stage, it reads files, searches patterns, and explores dependencies — without writing.
-
Implements changes — In the Development stage, it creates and edits files, runs commands, and uses tools.
-
Audits the result — In the Audit stage, it validates changes and runs tests.
-
Generates a report — In the Report stage, it presents a clear summary: what changed, why, and how to verify.
-
You stay in control — Every file change and terminal command requires your approval.
🔌 Use Any API and Model
TAO·CODER supports a wide range of API providers:
- Anthropic (Claude Sonnet, Opus)
- OpenAI (GPT-4, GPT-4o)
- Google Gemini (Pro, Ultra)
- AWS Bedrock (Claude, Llama)
- Azure OpenAI
- GCP Vertex AI
- OpenRouter (access 200+ models)
- Cerebras, Groq, Mistral
- Any OpenAI-compatible API
- Local models via LM Studio or Ollama
The extension tracks total tokens and API usage cost for the entire task loop and individual requests.
🛠️ Capabilities
Create and Edit Files
TAO·CODER creates and edits files directly in your editor, presenting a diff view of changes. You can modify or revert changes in the diff editor, or provide feedback in chat. It monitors linter/compiler errors (missing imports, syntax errors) and fixes them proactively.
All changes are recorded in your file's Timeline for easy tracking and rollback.
Run Commands in Terminal
Execute commands directly in your terminal and receive output in real time. Install packages, run builds, deploy apps, manage databases, run tests — all while TAO·CODER adapts to your dev environment and toolchain.
For long-running processes (dev servers, builds), use "Proceed While Running" — TAO·CODER continues working and responds to new terminal output as it arrives.
Use the Browser
TAO·CODER can launch a browser, click elements, type text, scroll, and capture screenshots + console logs. Use it for:
- Interactive debugging — Watch TAO·CODER navigate your app and identify visual bugs
- End-to-end testing — Automated test flows in a real browser
- General web use — Fetch and process web content
Extend with Tools (MCP)
TAO·CODER supports the Model Context Protocol (MCP), letting you extend its capabilities with custom tools:
- "Add a tool that fetches Jira tickets" — Retrieve ticket ACs and put TAO·CODER to work
- "Add a tool that manages AWS EC2s" — Check metrics and scale instances
- "Add a tool that pulls the latest PagerDuty incidents" — Fix bugs in real time
Use community-made MCP servers or ask TAO·CODER to create custom tools tailored to your workflow.
📎 Add Context
| Shortcut | What it does |
|---|---|
@url |
Paste a URL — TAO·CODER fetches and converts to markdown for latest docs |
@problems |
Add workspace errors and warnings for TAO·CODER to fix |
@file |
Add a file's contents (with type-to-search) |
@folder |
Add an entire folder's files at once |
📸 Checkpoints: Compare and Restore
As TAO·CODER works through a task, it takes workspace snapshots at each step:
- Compare — See a diff between the snapshot and your current workspace
- Restore — Roll back files and task history to any checkpoint
Restore uses a single canonical action that returns your workspace and aligned task history to the selected point. On newer compound checkpoints it also restores the matching task-context snapshot. This lets you safely explore different approaches without worrying about state getting out of sync.
🤝 Contributing
See our Contributing Guide to learn how to contribute. All contributions are welcome — bug fixes, features, documentation, and translations.
📜 License
Apache 2.0 — TAO·CODER is open source and free to use.
🙏 Acknowledgments
TAO·CODER builds upon open-source AI coding tools available in the community. The extension architecture and MCP tool infrastructure are inspired by established patterns in the ecosystem, while the core agent logic, stage pipeline, external Task Context Kernel memory, role modes, and update-cycle mechanism represent original development.
See LICENSE for full terms (Apache 2.0).