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
{{ message }}
Repository navigation
[FEATURE]: System prompt environment information plug-in API #31158
creating new skills, removing old skills
The user cannot:
modify environment information
disabled or modify system reminders
I am aware that plugins can directly modify the raw system prompt. Feel free to close this if the effort is not worth it (I can still create a fork regardless!).
Extra context: I wish to create a plugin that injects some stateful information into the system prompt and expose a tool for the LLM to modify this stateful information. It's useful for long coding pipelines where the current agent needs to know what stage they're currently at. This plugin can also be implemented without this feature by modifying the raw system prompt or dynamically modifying the agent prompt. I also wish to make this contribution to better understand OpenCode :)
I will comment on this thread (if it is not manually closed) when the PR is ready.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]:Session lifecycle context hooks for persistent plugin state #28695: Proposes session lifecycle hooks (session.start, prompt.submit, session.stop) for plugins to inject persistent and ephemeral context into the system prompt — closely overlaps with the goal of exposing environment information to plugin authors.
If your request is distinct (e.g. specifically targeting the environment information block rather than general system prompt injection), it may be worth clarifying how it differs from the above.
clarification: a good naive approach would be to inject a bunch of plugin-generated text on the line before the closed <env> tag and set up a watcher for whenever the environment information or system prompt are regenerated.
Activity
github-actions commentedon Jun 6, 2026
This issue might be a duplicate of existing issues. Please check:
session.start,prompt.submit,session.stop) for plugins to inject persistent and ephemeral context into the system prompt — closely overlaps with the goal of exposing environment information to plugin authors.experimental.chat.system.transformandexperimental.chat.messages.transformhooks to give plugins better access to session context when modifying the system prompt.If your request is distinct (e.g. specifically targeting the environment information block rather than general system prompt injection), it may be worth clarifying how it differs from the above.
WywySenarios commentedon Jun 6, 2026
clarification: a good naive approach would be to inject a bunch of plugin-generated text on the line before the closed
<env>tag and set up a watcher for whenever the environment information or system prompt are regenerated.github-actions commentedon Aug 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.