All notable changes to Codi are documented in this file.
-
Ollama Cloud Provider Removed: The
ollama-cloudprovider has been removed. Use--provider ollamawithOLLAMA_HOST=https://ollama.cominstead. The regularollamaprovider uses the OpenAI-compatible API which works correctly with Ollama Cloud. -
Web Search Tool Migration: Replaced
WebSearchToolwithEnhancedWebSearchTool- Tool name remains
web_searchfor backward compatibility - Supports Brave API (primary), Google Custom Search, Bing API, and DuckDuckGo fallback
- Tool name remains
-
Workflow System Phase 8 - Production Ready (#173):
- AI-assisted workflow building with natural language
- Multi-step pipelines with variable substitution
- Git and PR action steps (commit, push, create-pr, review-pr)
- Comprehensive test coverage (E2E and unit tests)
- Template system for common workflow patterns
-
Context Debug Command (#179):
- New
/compact debugsubcommand for inspecting context window state - View message counts and token estimates
- Analyze working set and indexed files
- Debug context compaction behavior
- New
-
Enhanced Web Search - Phase 2 (#165, #170):
- Multi-engine support with automatic fallback
- Search templates for docs, pricing, and error queries
- Relevance scoring algorithm (domain, content match, quality)
- Per-engine rate limiting with graceful degradation
- Template-aware caching TTLs
-
Memory Monitoring (#167):
- Proactive context compaction based on memory pressure
- Automatic cleanup when approaching limits
-
Symbol Index Multi-Language Extension (#172):
- Improved symbol extraction across languages
- Better TypeScript/JavaScript support
-
Technical Debt Cleanup (#181):
- Extracted ~400 lines from
index.tsintosrc/cli/modules - Added discriminated union types for workflow steps
- Added 9 type guards for type-safe step handling
- Reduced
as anyusage from 30+ to 10 instances
- Extracted ~400 lines from
-
Debug Logging for Error Handlers (#185):
- Added
logger.debug()calls to 20 previously silent catch blocks - Enables troubleshooting with
--debugflag - Files: memory.ts, session.ts, history.ts, usage.ts, agent.ts, diff.ts, spinner.ts
- Added
-
Plugin System Investigation (#181):
- Created comprehensive
docs/PLUGIN-INVESTIGATION.md - Security analysis and recommendations
- Phased re-enablement roadmap
- Created comprehensive
- UI Freeze During Compaction (#174): Fixed UI becoming unresponsive during context compaction
- Workflow E2E Tests (#180): Resolved flaky PR review tests with improved mock agent
- Model Display Updates (#175): Fixed model display not updating when provider changes during workflow
- IPC Disconnect Race (#164): Graceful IPC disconnect prevents race condition in orchestration
- Ink UI Stability (#163): Added tool call display and improved visual stability
- 2151 tests passing
- Added workflow E2E tests for PR review workflow
- Added rate limiting tests for enhanced web search
- Improved test stability with buffer flush helpers
-
GitHub Pages Enhancement: Complete redesign of documentation site
- Added demo GIF with terminal window styling and animated gradient border
- Added badges for version, license, Node requirement, and default model
- Added Tools section showing all 12 built-in tools
- Added Usage & Models command section
- Visual improvements: animations, glow effects, smooth scrolling
- Open Graph meta tags for better social sharing
- Improved mobile responsiveness
-
Default Ollama Model: Changed default from
llama3.2toglm-4.7:cloud- Applies to both local Ollama and Ollama Cloud providers
- Updated codi-models.yaml with current defaults:
- Opus updated to
claude-opus-4-5-20251101 - Added
gpt-5andgpt-5-nanofor OpenAI - Renamed
llama3toglmusingglm-4.7:cloud - Fallback chain now prioritizes opus → sonnet → haiku → gpt-5 → glm
- Opus updated to
- Claude Opus 4.5 as Default: Changed default Anthropic model from Claude Sonnet 4 to Claude Opus 4.5 (
claude-opus-4-5-20251101)- Added Opus 4.5 pricing to usage tracking ($15/$75 per 1M tokens)
- Added Opus 4.5 to static model registry
- Development Process: Updated CODI.md to require tests before merging PRs
- AI agents must run
pnpm build && pnpm testbefore merging - Added self-review template with build/test status
- Ensures code quality and prevents regressions
- AI agents must run
- Fixed
getAllCommands()function call in index.ts - Fixed
IndexErrorCallbackto expect Error objects instead of strings
- Dynamic Context Configuration: Tier-based context settings
- README Accuracy Update: Comprehensive documentation review
- Added 8 missing CLI options
- Documented /init command
- Added missing command sections (Usage, Planning, RAG, Approvals)
- Expanded .codi.json example with all config options
-
JSON Parser: Fixed tool call parsing for models that output raw newlines in JSON strings
- Models like glm-4.7 via Ollama Cloud can now correctly parse multiline commands
- Added
escapeNewlinesInStrings()preprocessing before JSON parsing
-
Bracketed Paste: Rewritten paste handling to capture and display summary
- Now shows
[pasted N lines, M chars]like Claude Code
- Now shows
-
Documentation: Fixed README and CODI.md discrepancies
- Added
ollama-cloudto CLI provider options - Updated OpenAI models to include GPT-5
- Added
Commands are now organized under /git and /code prefixes for better discoverability:
Git Commands → /git <action>
/git commit,/git branch,/git diff,/git pr,/git stash/git log,/git status,/git undo,/git merge,/git rebase
Code Commands → /code <action>
/code refactor,/code fix,/code test,/code doc,/code optimize
Backward Compatibility: Popular commands still work as standalone aliases:
/commit,/branch,/pr(git)/refactor,/fix,/test(code)
- Added CODI.md as the main documentation file (CLAUDE.md symlinked for AI compatibility)
- Added ollama-cloud provider to docs and README
- Synced all commands between README and GitHub Pages site
- Added demo GIF to README
- Updated branding to "AI coding wingman"
- Set up GitHub Pages documentation site
- Fixed arrow key navigation - Resolved issue where arrow keys showed escape sequences (
^[[A) after commands completed. Root cause was ora spinner'sdiscardStdinsetting interfering with readline.
- Added spinner for
/compactcommand - Visual feedback while context compaction runs
- Added git worktree documentation - CLAUDE.md now includes guidance for working with multiple worktrees
- Removed interactive command picker - Feature was causing terminal handling conflicts; may revisit in future
Generate comprehensive AI context files automatically:
/codi generate # Analyze codebase and create CODI.md
/codi show # Display current context file
/codi edit # Get AI help to improve it- Project type, language, and framework detection
- Directory structure (2 levels)
- Package.json scripts as quick reference
- Key files with purposes
- Top dependencies with descriptions
- Test framework detection
- Coding conventions based on language
/init # Now creates .codi.json, codi-models.yaml, AND CODI.md
/init --context # Create only CODI.md template- Added retry for flaky e2e tests
- Disabled file parallelism to avoid resource contention
- Increased default test timeout
- Bun lockfile detection for package manager
- Improved pytest detection (checks pyproject.toml content)
- Performance: cached stat results in directory walk
Replace fixed 40% context allocation with adaptive calculation that maximizes available context:
| Model | Context Window | Old Limit (40%) | New Adaptive Limit |
|---|---|---|---|
| Claude (200k) | 200,000 | 80,000 | ~189,000 |
| GPT-4o (128k) | 128,000 | 51,200 | ~117,000 |
| GPT-4 base (8k) | 8,192 | 3,276 | 2,457 (30% floor) |
Formula: contextWindow - systemPrompt - tools - outputReserve - buffer
- Falls back to 30% minimum when overhead exceeds available space
- Warns when message budget is below 5k tokens
- New constants:
MAX_OUTPUT_TOKENS,CONTEXT_SAFETY_BUFFER,MIN_CONTEXT_PERCENT,MIN_VIABLE_CONTEXT
- Added Git Workflow guidelines to CLAUDE.md and CONTRIBUTING.md
- Established branch/PR workflow (never push directly to main)
- Content-aware estimation: Different ratios for prose (~4 chars/token), code (~3), and JSON (~3.5)
- Complete context accounting: System prompt and tool definitions now included in token counts
- Calibration from API responses: Exponential moving average improves accuracy over time
- Proper slash command (converted from built-in handler)
- Alias:
/summarize - Shows before/after token counts
- Pre-compiled combined regex for single-pass matching
- Minimum length guard (15 chars) skips short text
- More specific patterns reduce false positives
- Tool parsing: Fixed nested parentheses in quoted strings (e.g.,
response.cookies.get('token')) being truncated - Tool extraction: Fixed tool calls not being detected when model sends all content via "thinking" field
The regex-based tool extraction [^)]* stopped at the first ) even inside quoted strings. Replaced with a state machine that properly tracks string context and escape sequences.
- Context limit now adapts to the model being used (40% of model's context window)
- Claude 200k → 80k threshold
- GPT-4o 128k → 51k threshold
- GPT-4 base 8k → 3.2k threshold
- Context limit automatically recalculates when switching providers mid-session
- Disabled by default - was confusing models that output E1/E2 symbols
- Enable with
--compressflag when needed - Only applies compression if it actually saves space (including legend overhead)
- Output is now decompressed so you never see raw entity references
- Code relevance scoring - messages discussing indexed files get higher importance during compaction
- File context in summaries - extracted file paths included in summarization prompts
- Semantic deduplication - similar messages grouped together using embeddings (when RAG enabled)
- Vector utilities extracted to
src/utils/vector.tsfor reusability - Fixed model matching to prevent "gpt-4" incorrectly matching "gpt-4o"
- Static imports for better performance
For earlier versions, see the GitHub Releases page.