- fix(hooks): skip todo continuation when agent has pending question (#1888) Add pending-question-detection module that walks messages backwards to detect unanswered question tool_use, preventing CONTINUATION_PROMPT injection while awaiting user response. - fix(config): allow custom agent names in disabled_agents (#1693) Change disabled_agents schema from BuiltinAgentNameSchema to z.string() and add filterDisabledAgents helper in agent-config-handler to filter user, project, and plugin agents with case-insensitive matching. - fix(agents): change primary agents mode to 'all' (#1891) Update Sisyphus, Hephaestus, and Atlas agent modes from 'primary' to 'all' so they are available for @mention routing and task() delegation in addition to direct chat.
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
MAX_CONSECUTIVE_FAILURES,
|
||||
} from "./constants"
|
||||
import { isLastAssistantMessageAborted } from "./abort-detection"
|
||||
import { hasUnansweredQuestion } from "./pending-question-detection"
|
||||
import { getIncompleteCount } from "./todo"
|
||||
import type { MessageInfo, ResolvedMessageInfo, Todo } from "./types"
|
||||
import type { SessionStateStore } from "./session-state"
|
||||
@@ -74,6 +75,10 @@ export async function handleSessionIdle(args: {
|
||||
log(`[${HOOK_NAME}] Skipped: last assistant message was aborted (API fallback)`, { sessionID })
|
||||
return
|
||||
}
|
||||
if (hasUnansweredQuestion(messages)) {
|
||||
log(`[${HOOK_NAME}] Skipped: pending question awaiting user response`, { sessionID })
|
||||
return
|
||||
}
|
||||
} catch (error) {
|
||||
log(`[${HOOK_NAME}] Messages fetch failed, continuing`, { sessionID, error: String(error) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user