feature: OpenCode support — detection, settings, parsed events, token and cost accounting
Open
Nobody has claimed this yet.
enhancement
high priority
- Dominant language
- Go
- Stars
- 13
- Forks
- 40
- Avg merge
- 12h 17m
- Merged PRs (30d)
- 156
Description
Feature Description
Second agent on the agent integration contract, and the first non-Claude one. OpenCode is
open source, so it is the integration anyone outside the team can reproduce.
Proposed Solution
- Detect an installed OpenCode and locate its settings
- Patch it to use
localhost:47600and the Cortex CA; ask before editing, support revert - Traffic parsed into typed events, not merely proxied
- Token counts and cost correct for its wire format; if it is not Anthropic-shaped, either
parse it properly or emit a clearly-labelled partial event - Session and cost metrics aggregate alongside Claude Code sessions, with field names
agreed with per-session token and cost aggregation - A tool inventory for OpenCode, or state explicitly that tool pruning is unsupported for
it — without one, pruning silently saves nothing - Setup documented; verified depth stated
Additional Context
Part of the Cortex v0.9.0 release. Depends on the agent integration contract.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.