-
-
Notifications
You must be signed in to change notification settings - Fork 40.3k
Closed as not planned
Description
Summary
Enable hooks to listen to message:received and message:sent events for automated chat logging and processing.
Use Case
I want to automatically log all incoming/outgoing messages to a file so the agent can recover context when it gets truncated mid-conversation. Currently these events are listed as "Future Events" in the hooks documentation but aren't implemented yet.
Current Workaround
Manual logging by the agent at the end of each turn - unreliable since the agent might forget or context gets cut before it can write.
Proposed Implementation
// hooks/chat-logger/index.js
module.exports = {
events: ['message:received', 'message:sent'],
async handler(event) {
const { type, message, channel, timestamp } = event;
// Append to log file
}
};Impact
This would significantly improve agent continuity and reduce frustration when context windows get truncated.
Thanks! 🎮
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels