fix(openclaw): skip session.created dispatch for subagent sessions

This commit is contained in:
YeonGyu-Kim
2026-04-10 18:47:18 +09:00
parent de156578ea
commit 6ec9a2bd79
2 changed files with 52 additions and 3 deletions
+4 -1
View File
@@ -382,7 +382,10 @@ export function createEventHandler(args: {
);
}
if (pluginConfig.openclaw && sessionInfo?.id) {
// Skip subagent sessions — they are dispatched by specialized callbacks
// in create-managers.ts (async) and tool-registry.ts (sync)
const isSubagentSession = !!sessionInfo?.parentID;
if (pluginConfig.openclaw && sessionInfo?.id && !isSubagentSession) {
await dispatchOpenClawEvent({
config: pluginConfig.openclaw,
rawEvent: event.type,