Stop Wasting 25K Tokens Per Session: TaskWing's Local-First AI Memory Is Here
Every developer knows the soul-crushing ritual. You open Claude, Cursor, or Copilot. You paste your goal. Then comes the interrogation — "Can you show me the relevant files?" "What's your tech stack?" "Explain this architecture." Twenty minutes later, after feeding 25,000 tokens of context into the void, your AI assistant finally understands your codebase enough to be useful.
Then you start a new session tomorrow. And it all vanishes.
Your architectural decisions, your patterns, your constraints — poof, gone. The cloud-based AI tools you pay for treat every conversation like amnesia. Worse, every file you drag into that chat window? That's proprietary code flowing through someone else's servers, parsed, logged, who-knows-what.
What if your AI tools remembered? What if your codebase's entire architectural DNA lived on your machine — private, persistent, instantly queryable — without a single byte leaving your infrastructure?
Enter TaskWing. Built by josephgoksu, this open-source Go project isn't just another AI wrapper. It's a radical reimagining of how AI-assisted development should work: local-first, privacy-preserving, and contextually immortal. One command extracts your architecture. Every session after that just knows.
The numbers are insane. Without TaskWing: 8-12 file reads, ~25,000 tokens, 2-3 minutes of setup per session. With TaskWing: 1 command, ~1,500 tokens, 42 seconds, and 170+ knowledge nodes instantly available. That's not incremental improvement — that's a 10x productivity unlock hiding in plain sight.
Ready to stop being your AI's unpaid context engineer? Let's dive deep.
What Is TaskWing?
TaskWing is a local-first AI knowledge layer for software development. At its core, it's a command-line tool written in Go that extracts architectural decisions, design patterns, and constraints from your codebase, stores them in a local SQLite database, and makes them queryable by any AI tool through simple slash commands or direct CLI invocation.
The project was created by josephgoksu with a crystal-clear product vision: eliminate the repetitive context-building phase of AI-assisted development while ensuring your proprietary code never becomes training data for someone else's model. In an era where every AI startup wants your code in their cloud, TaskWing's architectural stance is almost rebellious.
Why it's trending now: The developer community is hitting a privacy and efficiency wall with cloud-first AI tools. Recent controversies around code leakage, unexpected AI training data usage, and the sheer cost of context windows (both in tokens and time) have created explosive demand for alternatives. TaskWing arrives at this inflection point with a technically elegant solution: instead of sending your code to AI, bring AI's understanding to your code — locally.
The project's traction is visible in its ecosystem support. TaskWing integrates with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode — essentially every major AI coding assistant. It supports OpenAI, Anthropic, Google Gemini, AWS Bedrock, and Ollama for the actual LLM inference, with special emphasis on local execution through Ollama for complete air-gapped operation.
What makes TaskWing genuinely different from "just use RAG" solutions? It's not retrieval-augmented generation in the traditional sense. It's persistent architectural memory — a structured knowledge graph that survives across sessions, tools, and even different AI providers. Your knowledge base becomes infrastructure, not conversation history.
Key Features That Change Everything
Local-First by Design, Not Afterthought
TaskWing's architecture is aggressively local. Your knowledge base lives in .taskwing/memory.db — a SQLite file on your machine. No cloud database. No account required. No sync daemons. The tool works entirely offline after initial setup. This isn't a feature flag; it's the foundational design decision that enables everything else.
One-Command Architecture Extraction
The taskwing learn command performs static analysis on your codebase and extracts structured knowledge: decisions (why you chose X over Y), patterns (recurring solutions), and constraints (technical limitations). The README shows a typical extraction yielding 22 decisions, 12 patterns, 9 constraints — instantly creating a rich semantic layer that would take hours to document manually.
Universal AI Tool Integration via Slash Commands
Here's where TaskWing gets clever. Instead of building complex MCP (Model Context Protocol) servers or per-tool plugins, TaskWing uses pure prompt-driven slash commands that invoke the local CLI:
/taskwing:plan— Clarifies goals and builds approved execution plans/taskwing:next— Delivers the next task with full architectural context/taskwing:done— Marks completion and advances the workflow/taskwing:context— Dumps complete project knowledge for deep architectural discussions
These work in any AI client that can run shell commands — no registration, no daemon, no vendor lock-in.
Autonomous Execution with Safety Guardrails
For Claude Code users, TaskWing provides hook integration for truly autonomous plan execution:
taskwing hook session-init # Initialize session tracking
taskwing hook continue-check # Check if should continue to next task
taskwing hook session-end # Cleanup session
taskwing hook status # View current session state
Circuit breakers prevent runaway AI agents: --max-tasks=5 stops execution for human review, and --max-minutes=30 enforces time boundaries. This is production-grade autonomy with adult supervision built in.
Multi-Provider LLM Flexibility
TaskWing doesn't force you into a single AI vendor. Configure any supported provider in .taskwing.yaml:
llm:
provider: bedrock
model: anthropic.claude-sonnet-4-5-20250929-v1:0
bedrock:
region: us-east-1
apiKeys:
bedrock: ${BEDROCK_API_KEY}
Or use taskwing config for interactive setup. The AWS Bedrock integration is particularly notable for enterprise users needing compliance with data residency requirements.
Complete Air-Gap Capability
For security-critical environments, pair TaskWing with Ollama for local LLM inference. Zero network calls. Your code never touches the internet. Your knowledge base never leaves your machine. This is the setup defense contractors, financial institutions, and paranoid solo developers have been waiting for.
Real-World Use Cases Where TaskWing Dominates
1. The Multi-Session Architecture Nightmare
You're building a distributed system. Monday, you explain the event-sourcing pattern to Claude. Tuesday, you start fresh — and Claude suggests a CRUD approach that fundamentally conflicts with your architecture. With TaskWing: Your event-sourcing decision is node #7 in the knowledge base. Every session, every tool, every model knows this instantly. No regression. No re-explanation.
2. The Onboarding Velocity Trap
New team member joins. Traditionally: days of architecture docs, code tours, "why did we do it this way?" Slack threads. With TaskWing: Run taskwing knowledge --json, pipe it to their AI assistant. They query architectural decisions conversationally. Onboarding time collapses from days to hours.
3. The Compliance-Constrained Enterprise
Your legal team banned cloud AI tools after a data incident. But your engineers need AI assistance to remain competitive. With TaskWing + Ollama: Full air-gapped operation. Local knowledge extraction, local inference, local execution. Get AI productivity without compliance nightmares. The architecture diagram in the README explicitly shows this "FULL AIR-GAP" configuration.
4. The Token Budget Crisis
You're burning through API credits. Each session's context building costs $0.50-2.00 before any actual work gets done. Multiply by team size, session frequency, project duration. With TaskWing: ~1,500 tokens versus ~25,000 tokens per session. That's a 94% reduction in context overhead. For a 10-person team doing 5 sessions daily, that's thousands of dollars monthly in pure savings.
5. The Tool-Hopping Developer
You use Claude for brainstorming, Cursor for implementation, Copilot for quick completions. Each tool lives in its own silo. With TaskWing: Your knowledge base is tool-agnostic. The same .taskwing/memory.db serves every assistant. Switch tools without losing context. This is interoperability that no single vendor will ever provide.
Step-by-Step Installation & Setup Guide
Prerequisites
- macOS or Linux (Windows via WSL)
- Git repository (TaskWing analyzes version-controlled code)
- One of: Homebrew, curl, or Go toolchain for building from source
Installation
Option 1: Homebrew (Recommended)
# Add the tap and install in one command
brew install josephgoksu/tap/taskwing
Option 2: Direct Install Script
# Fetches and installs the latest release binary
curl -fsSL https://taskwing.app/install.sh | sh
Verify installation:
taskwing --version
Project Initialization
Navigate to your project directory and initialize:
cd /path/to/your-project
# Creates .taskwing.yaml configuration and AI tool integration files
taskwing init
This command writes:
.taskwing.yaml— Project configuration and LLM provider settings.claude/commands/taskwing/— Claude Code slash command definitions
Architecture Extraction
# One-time analysis of your entire codebase
taskwing learn
Expected output shows extraction statistics:
22 decisions, 12 patterns, 9 constraints extracted
This populates .taskwing/memory.db with structured knowledge nodes. Re-run when significant architectural changes occur.
LLM Provider Configuration
Interactive setup:
taskwing config
Or edit .taskwing.yaml directly. Example for OpenAI:
llm:
provider: openai
model: gpt-4o
apiKeys:
openai: ${OPENAI_API_KEY}
For AWS Bedrock (enterprise/ compliance scenarios):
llm:
provider: bedrock
model: anthropic.claude-sonnet-4-5-20250929-v1:0
bedrock:
region: us-east-1
apiKeys:
bedrock: ${BEDROCK_API_KEY}
For complete air-gap with Ollama:
llm:
provider: ollama
model: llama3.1:8b
ollama:
host: http://localhost:11434
Ensure Ollama is running: ollama serve
Verification
# Check system health
taskwing doctor
# Test knowledge querying
taskwing ask "What patterns are used for database access?"
# View all extracted knowledge
taskwing knowledge --json | head -50
REAL Code Examples from the Repository
Let's examine actual patterns from TaskWing's README and documentation, with detailed explanations of how to leverage them in practice.
Example 1: The Core Workflow — Init, Learn, Plan, Execute
# 1. Declare a TaskWing project + generate AI tool integration files
cd your-project
taskwing init # writes .taskwing.yaml + .claude/commands/taskwing/
# 2. Extract your architecture (one-time, re-run after major changes)
taskwing learn
# -> 22 decisions, 12 patterns, 9 constraints extracted
# 3. Plan and execute with your AI assistant
/taskwing:plan # Create a plan — AI clarifies goal, proposes decomposition
/taskwing:next # Get next task with full architectural context injected
# ...you implement, with AI assistance that ALREADY knows your architecture...
/taskwing:done # Mark complete, advance to next task
What's happening here: This is TaskWing's fundamental interaction loop. The init command bootstraps project metadata and generates AI tool-specific integration files (currently Claude Code commands, extensible to others). The learn command performs static analysis — parsing your code's AST, identifying design patterns, inferring architectural decisions from configuration files and code structure.
The slash commands are where the magic lives. /taskwing:plan isn't just "make a todo list" — it queries your knowledge base to understand constraints that would affect planning. /taskwing:next injects relevant architectural context into the AI's prompt automatically. You never manually paste ARCHITECTURE.md again.
Example 2: Direct CLI Knowledge Querying
# Search project knowledge for specific architectural information
taskwing ask "What patterns are used for database access?" --json
Behind the scenes: This queries the SQLite knowledge base using semantic search (likely vector embeddings or structured keyword matching — the exact retrieval mechanism isn't specified in the README but the JSON output suggests structured node retrieval). The --json flag enables programmatic consumption, perfect for CI/CD pipelines or custom tooling.
Practical pattern: Build a pre-commit hook that warns when you're violating documented constraints:
#!/bin/bash
# .git/hooks/pre-commit
# Check if changes touch authentication code
if git diff --cached --name-only | grep -q "auth/"; then
# Verify against architectural constraints
taskwing ask "What are the authentication security requirements?" --json > /tmp/auth-constraints.json
# Your validation logic here...
fi
Example 3: Task Lifecycle Management
# Get the next pending task from your plan
taskwing task next --json
# Claim a task for execution
taskwing task start <id>
# After implementation and verification, mark complete with evidence
taskwing task complete <id> --summary "Refactored UserRepository to use Unit of Work pattern" --files src/repository/user.go,src/unitofwork/unitofwork.go
The power move here: The --files parameter creates traceability between tasks and code changes. Combined with the --summary, this builds an automatic work log. For teams, this replaces manual standup updates. For solo developers, it's a searchable history of why changes happened, not just what changed.
The JSON output from taskwing task next --json enables custom integrations. Parse it in your editor plugin, display it in your status bar, feed it to a project management API.
Example 4: Autonomous Execution Hooks
# Initialize a tracked autonomous session
taskwing hook session-init
# In your AI tool's loop, check whether to continue
taskwing hook continue-check
# Returns exit code 0 if more tasks exist, non-zero if complete or circuit breaker triggered
# Clean up when done
taskwing hook session-end
# Inspect current state anytime
taskwing hook status
Critical safety integration: These hooks implement the circuit breakers mentioned in the documentation. A typical Claude Code integration looks like:
#!/bin/bash
# Autonomous execution wrapper with safety limits
taskwing hook session-init --max-tasks=5 --max-minutes=30
while taskwing hook continue-check; do
# Get next task with context
taskwing task next --json > /tmp/next-task.json
# Extract task description for AI
TASK=$(jq -r '.description' /tmp/next-task.json)
# Your AI execution logic here...
# claude --prompt "Execute: $TASK with context from taskwing context"
# Mark complete after verification
taskwing task complete $(jq -r '.id' /tmp/next-task.json) --summary "Autonomous completion" --files changed.go
done
taskwing hook session-end
This pattern enables genuinely autonomous agents that won't run amok — the --max-tasks and --max-minutes parameters are hard limits, not suggestions.
Example 5: Complete Knowledge Dump for Deep Context
# Export every knowledge node, grouped by type
taskwing knowledge --json
When to use this: Before asking your AI to make fundamental architectural changes. Instead of hoping the AI remembers that you use CQRS, or finding the right files to paste, dump the complete knowledge base. The AI receives structured data: decisions with rationales, patterns with examples, constraints with severity levels.
Pro tip: Pipe this through jq for targeted queries:
# Find all security-related decisions
taskwing knowledge --json | jq '.decisions[] | select(.tags[] | contains("security"))'
# Count pattern usage by category
taskwing knowledge --json | jq '.patterns | group_by(.category) | map({category: .[0].category, count: length})'
Advanced Usage & Best Practices
Knowledge Base Hygiene
Treat taskwing learn like git commit — run it after meaningful architectural changes, but not every file save. The sweet spot: after completing feature branches, before major refactoring, and when onboarding new team members. Stale knowledge is worse than no knowledge.
Multi-Provider Strategy
Use different LLM providers for different phases:
- Anthropic Claude for planning (superior reasoning)
- Local Ollama for sensitive code analysis (privacy)
- OpenAI GPT-4o for quick task execution (speed)
TaskWing's provider-agnostic design makes this trivial — just swap the provider field in config.
Custom Tool Integration
The CLI verbs are your API. Build editor plugins, CI checks, or team dashboards:
# Daily standup generator
taskwing task current --json | jq '{status: .status, blocker: .blocker, next: .next_action}'
# Architecture drift detection (compare current code against stored decisions)
taskwing ask "Are we still using repository pattern?" --json
The .taskwing.yaml as Living Documentation
Version-control this file. It captures your project's AI-assisted development configuration, making your tooling choices explicit and reproducible across environments.
Performance Optimization
For massive codebases, the initial taskwing learn may take time. Consider:
- Excluding
vendor/,node_modules/, generated code via.taskwingignore(if supported, or future feature) - Running on CI for baseline, then incremental updates locally
- Using
--jsonoutput for caching in CI pipelines
Comparison with Alternatives
| Capability | TaskWing | Cursor Memory | GitHub Copilot Chat | Custom RAG Setup |
|---|---|---|---|---|
| Storage Location | Local SQLite | Cloud (Cursor's servers) | Cloud (Microsoft/GitHub) | Varies (usually cloud) |
| Cross-Session Persistence | ✅ Universal | ✅ Cursor only | ⚠️ Limited | ❌ Complex to build |
| Cross-Tool Portability | ✅ Any AI tool with shell access | ❌ Cursor only | ❌ Copilot only | ❌ Custom per integration |
| Privacy/Air-Gap | ✅ Full air-gap possible | ❌ Cloud-dependent | ❌ Cloud-dependent | ⚠️ DIY responsibility |
| Setup Complexity | One command | Zero (built-in) | Zero (built-in) | Days to weeks |
| Token Efficiency | ~94% reduction | Moderate improvement | Moderate improvement | Varies |
| Cost | Free, open-source | Subscription | Subscription | Infrastructure + dev time |
| Custom Knowledge Types | Decisions, patterns, constraints | Generic context | Generic context | Whatever you build |
| Autonomous Execution | ✅ Built-in hooks | ❌ | ❌ | DIY |
The verdict: Cursor and Copilot optimize for zero-friction individual sessions. TaskWing optimizes for sustainable, private, portable AI-assisted development at scale. Choose based on whether you value convenience or control — though TaskWing's one-command setup narrows that gap dramatically.
FAQ
Is TaskWing free to use?
Yes, TaskWing is MIT-licensed open source. You pay only for your chosen LLM provider's API usage (or nothing, if using local Ollama).
Does TaskWing work with Windows?
Currently macOS and Linux are supported. Windows users can run TaskWing through WSL2 with full functionality.
How does TaskWing differ from just using aider or claude-code directly?
Aider and Claude Code are AI clients. TaskWing is a knowledge infrastructure layer that enhances any client. Use them together: TaskWing provides persistent architectural memory, your AI client provides the interaction interface.
Can I use TaskWing without internet access?
Absolutely. Configure Ollama as your LLM provider, and TaskWing operates in complete air-gap mode. Zero network calls after initial binary installation.
How often should I run taskwing learn?
After significant architectural changes: new dependencies, pattern introductions, major refactors. For active projects, weekly or per-sprint is typical. The knowledge base is append-only for safety — old decisions persist unless explicitly managed.
Is my code safe with TaskWing?
Your code is analyzed locally and stored locally. The only external communication is to your chosen LLM provider during the learn phase (for inference-based extraction) and during normal AI tool usage. For maximum security, use Ollama for the extraction phase too.
What if I switch from Claude to Cursor?
Your .taskwing/memory.db transfers instantly. Generate Cursor-specific commands with taskwing init in the same project. Your knowledge base is tool-agnostic by design.
Conclusion
TaskWing represents something rare in the AI tooling gold rush: a principled architectural decision that happens to solve multiple real problems simultaneously. The local-first approach eliminates privacy risks. The persistent knowledge base eliminates repetitive context building. The universal CLI integration eliminates vendor lock-in. The autonomous execution hooks enable genuinely productive AI agents without the runaway risk.
The numbers don't lie. 94% token reduction. 42 seconds versus 2-3 minutes. 170+ knowledge nodes versus zero architectural context. These aren't marginal gains — they're category changes in how developers interact with AI assistants.
But the deeper value is philosophical. TaskWing asserts that your codebase's meaning belongs to you, on your machine, accessible by your tools of choice. In an industry racing to centralize every computation in someone else's cloud, that's a stance worth supporting.
Ready to stop being a context delivery service for amnesiac AI tools?
Install TaskWing today:
brew install josephgoksu/tap/taskwing
Or grab the source, audit it, build it yourself — it's all at github.com/josephgoksu/TaskWing. Your future sessions will remember why you did.
Have you tried TaskWing? What's your context-building ritual costing you? Drop your experience in the comments — let's build a community of developers who refuse to repeat themselves.