anomalyco / anomalyco/opencode

Session title generation bypasses plugin hooks

Open
#46,115 0 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 29, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Session title generation bypasses plugin hooks entirely. The title agent's LLM call sends the raw first user message straight to the model — it never goes through plugin.trigger("experimental.chat.messages.transform", ...), unlike the main chat completion.

This means any plugin that redacts/anonymizes outgoing content (secrets, PII, etc.) has no way to intercept the title-generation request. The main chat message gets scrubbed correctly; the title request for the exact same message does not.

Suggested fix:
route title()'s outgoing messages through plugin.trigger("experimental.chat.messages.transform", ...) before the llm.stream() call, or add a dedicated hook for it.

Workaround in the meantime:
{"agent": {"title": {"disable": true}}} stops the call entirely (loses auto-generated titles).

Plugins

@rehydra/opencode v0.13.0 (used to surface the gap — content-transform plugins in general are affected, not specific to this one)

OpenCode version

1.18.20

Steps to reproduce
  1. Install a plugin that redacts outgoing message content via experimental.chat.messages.transform
  2. Start a new session, send a first message containing a secret
  3. Inspect actual outbound HTTP requests (MITM proxy or request tracer)
  4. See two LLM calls from the same input: main chat completion is scrubbed correctly; the title-generation call (agent=title, small=true) contains the raw, unscrubbed secret
Screenshot and/or share link

No response

Operating System

macOS 26.5.2

Terminal

iTerm2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.