Plugin-attached context is hidden from the user by contract
Plugin-attached context is hidden from the user by contract
Claude Code 2.1.299, macOS, terminal.
What happens
A plugin's prompt.submit hook can attach context to a message, and the types document it as never shown to the user. The same holds for prompt.compose sections and for text a tool.call hook adds to a tool result. The model reads every one of those lines. The person running the session sees none of them, and nothing in the transcript says a plugin added anything.
Why this matters
Steering the model is exactly the thing a person needs to be able to audit. A line the user cannot see cannot be found when it is wrong, stale, or harmful. We hit this ourselves: a mod of our own kept adding a reminder after every message for a day before anyone realised the model was reading it. A malicious or merely buggy plugin from a marketplace has the same power, and the user has no way to notice.
It also breaks the user's mental model. When the model behaves differently from what the visible transcript explains, the person debugging has no hint that a plugin is the cause.
What we ask for
Show every row a plugin attaches to the model's context in the transcript by default, dim, named by the plugin that added it: prompt.submit context, prompt.compose sections, and tool-result additions. A per-plugin opt-out could exist, but hidden should never be the default.
Workaround
We wrote a mod that mirrors each attached context row to $.ui.log, so the user sees a dim copy. It covers prompt.submit context from our own mods. It cannot see prompt.compose sections or rows the engine rewrites, and it only pins the tool-result door for the hooks we know about. Only the engine can do this completely.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗