[PR #4085] feat: add input context to chat.params and chat.message #10867

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

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

State: closed
Merged: Yes


Description

This PR enhances the plugin hook system by adding input context to both chat.params and chat.message hooks.

At the moment it's impossible to know which agent is selected for a UserMessage. It's only available in info.mode inside AssistantMessage.

This allows plugins to be context aware when reacting to chat messages.

Changes

  • Updated chat.message hook input signature to include sessionID, agent, model, and messageID
  • Updated chat.params hook input signature to include sessionID and agent
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4085 **State:** closed **Merged:** Yes --- ## Description This PR enhances the plugin hook system by adding input context to both `chat.params` and `chat.message` hooks. At the moment it's impossible to know which agent is selected for a `UserMessage`. It's only available in `info.mode` inside `AssistantMessage`. This allows plugins to be context aware when reacting to chat messages. ## Changes - Updated `chat.message` hook input signature to include `sessionID`, `agent`, `model`, and `messageID` - Updated `chat.params` hook input signature to include `sessionID` and `agent`
yindo added the pull-request label 2026-02-16 18:15:37 -05:00
yindo closed this issue 2026-02-16 18:15:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10867