From 93599cb1872a4063261e7c8c664bd5adbe31b047 Mon Sep 17 00:00:00 2001 From: Saurabh Mishra Date: Fri, 20 Mar 2026 21:25:53 +0530 Subject: [PATCH] Update src/auto-reply/reply/session.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- src/auto-reply/reply/session.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/auto-reply/reply/session.ts b/src/auto-reply/reply/session.ts index 36131932bb4..a70ff6909d6 100644 --- a/src/auto-reply/reply/session.ts +++ b/src/auto-reply/reply/session.ts @@ -558,6 +558,7 @@ export async function initSessionState(params: { }, ); + // When a session is auto-reset (idle timeout or daily reset), emit a // When a session is auto-reset (idle timeout or daily reset), emit a // session:reset internal hook so the session-memory hook can persist // the outgoing session context — just as it does for manual /new and /reset. @@ -565,17 +566,6 @@ export async function initSessionState(params: { // the handler reads it, getRecentSessionContentWithResetFallback() will // locate it via the .reset.* sibling naming convention. if (isNewSession && !resetTriggered && previousSessionEntry) { - const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId); - const autoResetEvent = createInternalHookEvent("session", "reset", sessionKey, { - sessionEntry, - previousSessionEntry, - commandSource: "auto-reset", - workspaceDir, - cfg, - }); - void triggerInternalHook(autoResetEvent).catch((err) => { - log.debug("session:reset hook error (auto-reset)", { error: String(err) }); - }); } // Archive old transcript so it doesn't accumulate on disk (#14869).