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]: Expose the ability to modify the chat messages thread via a plugin #7034
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Agents can often go down long paths and end up with either fruitful or bad results. We should allow a plugin or a tool to say "Ok I have gone down this path, and here is what I learnt, now we don't need to go down there again. Here be dragons" and effectively say
"Go back to this message in the chat history, send a message X back in time, and resume the chat from there"
This will allow for a lot longer running agents, who can be encouraged to do trial and error.
I think a tool might be the best here, but plugins can unlock interesting opportunities as well.
Existing feature request
I searched for time travel and found this - #4659 but it's not what I mean
Reacted by David Brouwer, Art Shendrik, fishnine and hugofqt
Opencode interprets the request to the large model as a text:
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "https://xxxxx/xxx.png please describe this image",
}
]
but the format required for large models is as follows:
Activity
github-actions commentedon Jan 6, 2026
This issue might be a duplicate of existing issues. Please check:
/undocommand only rolls back AI conversation message, not the associated file changes #5474:/undocommand only rolls back AI conversation message, not the associated file changes - related to reverting conversation stateredoableparameter to control permanent message deletion after revert #4681: Feature Request: Addredoableparameter to control permanent message deletion after revert - relates to message state managementFeel free to ignore if none of these address your specific case.
Wuchv commentedon Jan 23, 2026
I have the same requirement. my case is that a large model needs to understand an image based on a URL.
The prompt is as follows:
https://xxxxx/xxx.png please describe this image.
Opencode interprets the request to the large model as a text:
but the format required for large models is as follows:
I need a hook that can modify messages before making a request to the large model.
Wuchv commentedon Jan 23, 2026
https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/session/prompt.ts#L594
I looked at the code of OpenCode and found that it now supports modifying messages. Here is a demo:
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.