feat: Add Task tool & MCP awareness with ETag-based prompt verification (v2.1.0) #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This release enhances the CODEX_MODE bridge prompt with awareness of OpenCode's advanced capabilities (Task tool sub-agents and MCP tools) and implements a robust cache-based verification system for more reliable prompt filtering.
Key Improvements:
mcp__<server>__<tool>) so the model knows these capabilities existNew Features
1. Advanced Tools Section in Bridge Prompt
Added comprehensive documentation for Task tools and MCPs to the bridge prompt:
Task Tool (Sub-Agents):
MCP Tools:
2. OpenCode Prompt Verification Cache
Created
lib/prompts/opencode-codex.tswith ETag-based caching:Dual Verification System:
This prevents accidentally filtering custom AGENTS.md content or other developer messages.
Technical Changes
Architecture
filterOpenCodeSystemPrompts()→ asynctransformRequestBody()→ asynctransformRequestForCodex()→ asyncawaitFiles Changed
New Files:
lib/prompts/opencode-codex.ts- OpenCode prompt verification cache (109 lines)Modified Files:
lib/prompts/codex-opencode-bridge.ts- Added Advanced Tools section (~550 tokens, was ~450)lib/request/request-transformer.ts- Enhanced prompt detection with cached verificationlib/request/fetch-helpers.ts- Made transformation asyncindex.ts- Await async transformationAGENTS.md- Renamed from CLAUDE.md, updated header for all AI agentsREADME.md- Updated test count (129), added Task/MCP awareness mentions.gitignore- Added opencode.json and .opencode/package.json- Bumped version to 2.1.0Testing
New Test Coverage:
Benefits
Breaking Changes
None - all changes are additive and backward compatible.
Test Plan
npm run build)npm test)Release Notes
Version 2.1.0 includes:
🤖 Generated with Claude Code