[PR #5468] add experimental.chat.system.transform hook #11415

Closed
opened 2026-02-16 18:16:15 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5468

State: closed
Merged: No


Add a system prompt transform hook to allow plugins to alter system messages.

Plugins receive a mutable string[] containing the system prompt parts and can modify, add, or remove entries.

If a plugin empties the array, the original is restored and an error is logged to prevent downstream issues with empty system prompts.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5468 **State:** closed **Merged:** No --- Add a system prompt transform hook to allow plugins to alter system messages. Plugins receive a mutable `string[]` containing the system prompt parts and can modify, add, or remove entries. If a plugin empties the array, the original is restored and an error is logged to prevent downstream issues with empty system prompts.
yindo added the pull-request label 2026-02-16 18:16:15 -05:00
yindo closed this issue 2026-02-16 18:16:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11415