opencode plugin API gap: synthetic text bypasses the session.prompt filter hook
iceteaSA · ghdev · 2026-10-20
A feature proposal in anomalyco/opencode highlights a plugin API gap: ctx.session.synthetic(...) stores text without passing through the session.prompt hook, so filtering plugins can't intercept synthetic text.
- Code evidence: in v2.0.31, Session.synthetic (session.ts:273) calls admission.admit directly, while normal prompts first trigger hooks.trigger("session", "prompt", ...) (prompt.ts:40)
- Real impact: a plugin that strips secrets and unwanted text from user input works on prompts, but synthetic text from the host or other plugins bypasses the filter; it can only be filtered after storage at the session.context hook
- Proposed fix: trigger the session.prompt hook before storage, or add a session.synthetic hook with the same shape
The issue has 6 comments.
More from coding & agent
- Index Network open-sources Social Discovery Protocol: agents negotiate fit on your behalf — carsonfarmer · 2026-10-23
- Installed a formal-verification skill: it silently installed Java, MacBook runs 10 degrees hotter — zealcaiden · 2026-10-23
- OpenAI's Decisions API hits GA: near real-time routing up to 10x faster than GPT-6 Luna — OpenAIDevs · 2026-10-23
- Ruff author warns: upgrade Node/Bun now — --use-system-ca still accepts the eMudhra cert — charliermarsh · 2026-10-23
- Proof of Agent: paste one prompt and your AI mines, grades, and self-governs — adamamcbride · 2026-10-23
- DeepLearning.AI weekly: GPT-6.1 hits 97.9% byte parity on COBOL migration — DeepLearningAI · 2026-10-23