You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dm-context-filter.ts plugin's experimental.chat.system.transform hook runs and successfully strips Kimaki-only sections (## creating worktrees, ## cross-project commands, ## scheduled sends and task management, etc.) according to byte-level tests and live debug logging, but the model in a real chat session still reports seeing those sections.
This means the ~6,000 tokens of Kimaki-specific guidance the filter is supposed to remove are still being sent to the LLM, defeating the plugin's purpose.
Do you see "## creating worktrees" in your system prompt? Yes/no.
Model responds "yes", despite the byte-level harness proving the strip works.
Earlier byte-level instrumentation directly inside the running plugin (logging block.includes("## creating worktrees") before and after the strip) confirmed the same: beforeHasWorktrees=true → afterHasWorktrees=false. The reassigned output.system value contains the stripped prompt. Yet the model still sees the heading.
Hypotheses
Provider-specific path. The Kimaki anthropic-auth-plugin reaches into the outgoing HTTP request and rewrites payload.system directly (dist/anthropic-auth-plugin.js:607). For non-Anthropic providers, the transformed prompt may be ignored or short-circuited somewhere along the way. The verification probe that exposed this used openai/gpt-5.5, not Claude.
opencode uses the original prompt for actual API calls.experimental.chat.system.transform may only feed display/preview/title-generation paths in some opencode build, while the chat-completion path reads from the unmodified template.
Model self-report unreliability. Models can hallucinate "yes I see X" when X sounds plausible. Possible but unlikely given multiple independent confirmations (manual fresh thread, kimaki send --wait probe, the original session that started this investigation).
Next steps
Re-run the verification probe explicitly on Anthropic to see if the bug is provider-specific.
Add byte-level capture of the actual outgoing API request body (headers/system field) to compare against output.system after the transform — this is the only way to break ties between hypothesis 1 and 2 without trusting model introspection.
If transform-output is being ignored on the chat path, file upstream with opencode and decide whether the plugin should switch to a different hook (e.g. chat.params or HTTP-level rewriting like the auth plugin does).
Summary
The
dm-context-filter.tsplugin'sexperimental.chat.system.transformhook runs and successfully strips Kimaki-only sections (## creating worktrees,## cross-project commands,## scheduled sends and task management, etc.) according to byte-level tests and live debug logging, but the model in a real chat session still reports seeing those sections.This means the ~6,000 tokens of Kimaki-specific guidance the filter is supposed to remove are still being sent to the LLM, defeating the plugin's purpose.
Reproduction
Install latest
wp-coding-agents(post-fix(kimaki): make dm-context-filter strip-only #119) on a Kimaki + opencode site:Verify the strip-only plugin is in place:
diff -q ~/.nvm/.../kimaki/plugins/dm-context-filter.ts \ bridges/kimaki/plugins/dm-context-filter.tsRestart Kimaki so opencode reloads the plugin.
Run the harness — passes:
Spawn a fresh session and ask the model directly:
Model responds "yes", despite the byte-level harness proving the strip works.
Earlier byte-level instrumentation directly inside the running plugin (logging
block.includes("## creating worktrees")before and after the strip) confirmed the same:beforeHasWorktrees=true→afterHasWorktrees=false. The reassignedoutput.systemvalue contains the stripped prompt. Yet the model still sees the heading.Hypotheses
payload.systemdirectly (dist/anthropic-auth-plugin.js:607). For non-Anthropic providers, the transformed prompt may be ignored or short-circuited somewhere along the way. The verification probe that exposed this usedopenai/gpt-5.5, not Claude.experimental.chat.system.transformmay only feed display/preview/title-generation paths in some opencode build, while the chat-completion path reads from the unmodified template.kimaki send --waitprobe, the original session that started this investigation).Next steps
output.systemafter the transform — this is the only way to break ties between hypothesis 1 and 2 without trusting model introspection.chat.paramsor HTTP-level rewriting like the auth plugin does).Context
kimaki send --waitprobe (gpt-5.5).output.systemis correctly mutated.This is a real footgun: the plugin appears to be doing its job in CI but is silently no-op on the live chat path.