Releases: rickross/opencode-acm
v0.5.29 — ACM-11 Fixed, Clean Release
What's Changed
Bug Fix: System-reminder leaking into Mattermost DMs (ACM-11)
The messages.transform hook was incorrectly injecting the <system-reminder> block onto outbound Mattermost DM messages, causing agents to see each other's token counts and timestamps inline in chat.
Root cause: OpenCode wraps inbound Mattermost messages in multiple ways before they reach the hook:
[Metadata: sender=...]prefixThe user sent the following message:wrapper<system-reminder>wrapper (when a previous leak had already baked into message content)
The initial heuristic only caught [Metadata: — missing the other two shapes.
Fix: Broadened the skip condition to detect all three patterns, plus \n[Metadata: sender= anywhere near the top of the message text. Injection is now skipped for any message matching any of these patterns.
Housekeeping
- Removed debug logging added during ACM-11 diagnosis (v0.5.26–v0.5.28)
Notes
- OpenCode's own Mattermost plugin wraps inbound DMs in
<system-reminder>tags — this is OpenCode transport behavior and is outside ACM's control - v0.5.24-stable is tagged as a known-good rollback point if needed
- All dependencies are standard public packages (
@opencode-ai/plugin,@opencode-ai/sdk,zod) — no private or idiosyncratic dependencies
v0.5.23 — Aurora Review Fixes
What's Changed
Bug Fixes
acm_infonow reports effective system-reminder state — previously read only from the env var, missing thesystemReminder: falseplugin option path. Now reads from the resolved effective state set at plugin init.- Removed fake
create_backuparg fromacm_repair— the argument was advertised but never implemented. Removed to avoid misleading users. Backup support can be added properly in a future release.
Improvements
acm_diagnoseverbose mode implemented —verbose=truenow shows full message IDs, role, part counts per issue, and a session summary block. Previously theverbosearg was declared but unused.acm_fetchdescription corrected — docs previously said "active context" but the implementation searches the full session history (intentional wayback behavior). Description now matches reality.
Housekeeping
- Version string now read from
package.json— no more stray hardcoded version strings in tool implementations.
Thanks to Aurora for the thorough code review that surfaced all four of these issues.
v0.5.14 — Accurate token count matching TUI status bar
Changes
- Fix token count to use
t.totalfromoutput.messages— matches TUI status bar exactly - Root cause: previous versions used
input + output + cachesum which doesn't match Anthropic'stotalTokensfield t.totalis set directly from the AI SDK'susage.totalTokenswhich Anthropic populates with the full context size- Falls back to explicit sum for providers that don't set
totalTokens
Upgrade
npm install -g opencode-acm@latestv0.5.11 — Fix context limit source to match TUI
Changes
- Use
config.providers()instead ofprovider.list()to get the override-applied context limit - This is the same source the TUI uses for the status bar percentage
- Fixes limit showing 800,000 instead of the user-configured value from
opencode.json
Upgrade
npm install -g opencode-acm@latestv0.5.10 — Fix context limit to use opencode.json overrides
Changes
- Fix context limit in
<context-status>to use the user-overridden value fromopencode.json - Uses
provider.list()(same source as TUI status bar) instead of the raw model object from the hook - Falls back to the hook's model limit if provider list call fails
Upgrade
npm install -g opencode-acm@latestv0.5.9 — Configurable system-reminder
Changes
- Add
systemReminderplugin option (default:true) - Disable via plugin options in
opencode.json:"plugins": [["npm:opencode-acm", { "systemReminder": false }]]
- Or via env var:
OPENCODE_ACM_SYSTEM_REMINDER=0
Upgrade
npm install -g opencode-acm@latestv0.5.8 — Context-status injected into message stream
Changes
- ACM-10: Switch context-status injection from system prompt to message stream
- Injects
<system-reminder>as a synthetic part on the last user message each turn - Agent sees it naturally in context without needing to execute code to inspect it
- Mirrors openfork's original approach (
lastUserMsg.parts.push(...)) - Token count and percentage match OpenCode's status bar (same formula)
- Deduplication prevents stacking multiple reminders
system.transformnow strips stale static context-status blocks from team prompts and stores model limit for use in messages.transform
- Injects
Upgrade
npm install -g opencode-acm@latestv0.5.7 — Accurate context-status injection
Changes
- ACM-10: Inject accurate
<context-status>block into system-reminder every turn- Token count, percentage, and limit now match exactly what OpenCode shows in the status bar
- Uses same formula as
session-context-metrics.ts:tokens.input + output + reasoning + cache.read + cache.write - Token counts cached in
messages.transform(where message data is available), consumed insystem.transform - Removes stale/duplicate context-status blocks before injecting fresh one
- Falls back gracefully when no token data is available yet (first turn)
- Replaced hardcoded March 19 example in
irelate-team-prompt.txtwith a placeholder
Upgrade
npm install -g opencode-acm@latestv0.5.6 - ACM-4/5: Fix size labels, clarify search semantics
ACM-4: Fix size reporting labels
Renamed messageBytes → messageChars and relabeled all output from KB/bytes to ~Kchars with a note that this is a character count approximation, not bytes or tokens.
ACM-5: Clarify acm_search full-history semantics
Updated acm_search description to clearly state it searches full session history by default — the wayback machine behavior is intentional. Agents can recall context from before compaction boundaries.
v0.5.5 - ACM-9: System-reminder injection
ACM-9: Inject system-reminder with wall-clock time and context limit
Implements experimental.chat.system.transform to inject a <system-reminder> block on every turn containing:
- Current wall-clock time (locale string with timezone)
- Context token limit (from
OPENCODE_CONTEXT_STATUS_LIMITenv or model context window)
Skips injection if OpenCode has already injected its own time-containing system-reminder to avoid duplication.