Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/hooks/comment-checker/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export function createCommentCheckerHooks(config?: CommentCheckerConfig) {
): Promise<void> => {
debugLog("tool.execute.after:", { tool: input.tool, callID: input.callID })

if (!output.output || typeof output.output !== "string") {
debugLog("skipping: output.output is undefined or not a string")
return
}

const toolLower = input.tool.toLowerCase()

// Only skip if the output indicates a tool execution failure
Expand Down
1 change: 1 addition & 0 deletions src/hooks/edit-error-recovery/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function createEditErrorRecoveryHook(_ctx: PluginInput) {
output: { title: string; output: string; metadata: unknown }
) => {
if (input.tool.toLowerCase() !== "edit") return
if (!output.output || typeof output.output !== "string") return

const outputLower = output.output.toLowerCase()
const hasEditError = EDIT_ERROR_PATTERNS.some((pattern) =>
Expand Down
1 change: 1 addition & 0 deletions src/hooks/task-resume-info/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function createTaskResumeInfoHook() {
output: { title: string; output: string; metadata: unknown }
) => {
if (!TARGET_TOOLS.includes(input.tool)) return
if (!output.output || typeof output.output !== "string") return
if (output.output.startsWith("Error:") || output.output.startsWith("Failed")) return
if (output.output.includes("\nto continue:")) return

Expand Down