v2.1.0 - Task Tool & MCP Awareness with ETag-Based Prompt Verification
🎯 What's New
This release enhances the CODEX_MODE bridge prompt with awareness of OpenCode's advanced capabilities and implements a robust cache-based verification system for more reliable prompt filtering.
✨ New Features
🔧 Task Tool Awareness
The bridge prompt now documents OpenCode's sub-agent system, making the model aware it can delegate complex work to specialized agents:
- Explains Task tool availability and dynamic agent types
- Provides guidance on when to use sub-agents (complex analysis, isolated context)
- References tool schema for current agent capabilities
🔌 MCP Tool Awareness
Documents Model Context Protocol tool naming conventions so the model knows these capabilities exist:
- Explains
mcp__<server>__<tool>prefix convention - Encourages discovery of available MCP integrations
- Promotes usage when functionality matches task needs
✅ ETag-Based OpenCode Prompt Verification
Implements robust caching system for OpenCode's codex.txt to ensure 100% accurate prompt filtering:
- Fetches OpenCode's official codex.txt from GitHub
- Uses HTTP conditional requests (ETag) for efficient updates
- Dual verification: cached content match + text signature fallback
- Prevents accidentally filtering custom AGENTS.md content
📚 AGENTS.md (formerly CLAUDE.md)
Renamed development guide to be applicable to all AI agents:
- Updated header to reference Claude Code, Codex, and other AI agents
- Comprehensive coding guidance for agent-assisted development
- Documents 7-step fetch flow, module organization, and key design patterns
🔨 Technical Improvements
New Architecture:
- Made request transformation pipeline async to support cache fetching
- Created
lib/prompts/opencode-codex.tsfor prompt verification (109 lines) - Enhanced
isOpenCodeSystemPrompt()with dual verification system
Bridge Prompt Update:
- Added "Advanced Tools" section with Task tool and MCP documentation
- Increased from ~450 tokens to ~550 tokens
- Better model awareness of available capabilities
Test Coverage:
- Added 6 new tests verifying AGENTS.md content safety
- Total: 129 comprehensive tests (was 123)
- All tests passing ✅
📋 What's Changed
New Files:
lib/prompts/opencode-codex.ts- OpenCode prompt verification cache
Updated Files:
lib/prompts/codex-opencode-bridge.ts- Added Advanced Tools sectionlib/request/request-transformer.ts- Enhanced prompt detectionlib/request/fetch-helpers.ts- Made transformation asyncindex.ts- Await async transformationAGENTS.md- Renamed from CLAUDE.mdREADME.md- Updated test count, added Task/MCP mentions.gitignore- Added opencode.json and .opencode/package.json- Version bump to 2.1.0test/request-transformer.test.ts- Added 6 tests, async updates
🎁 Benefits
- Better Task Delegation - Model knows it can use Task tool for specialized work
- MCP Discoverability - Model aware of MCP tools and naming conventions
- Robust Filtering - Cache-based verification prevents false positives
- Future-Proof - Automatically updates when OpenCode changes their prompt
- Broader Applicability - AGENTS.md guidance applies to all AI agents
📦 Installation
# In your opencode config, use:
"plugin": ["opencode-openai-codex-auth"]
# Or upgrade from previous version:
sed -i.bak '/"opencode-openai-codex-auth"/d' ~/.cache/opencode/package.json && rm -rf ~/.cache/opencode/node_modules/opencode-openai-codex-auth⚠️ Breaking Changes
None - all changes are additive and backward compatible.
📊 Stats
- 10 files changed: +652 insertions, -671 deletions
- 129 tests: All passing ✅
- Bridge prompt: ~550 tokens (was ~450)
- Test coverage: Comprehensive including AGENTS.md safety verification
🔗 Full Changelog
See PR #15 for complete technical details.
Full Changelog: v2.0.0...v2.1.0