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
2 changes: 2 additions & 0 deletions src/hooks/comment-checker/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export function createCommentCheckerHooks(config?: CommentCheckerConfig) {

const toolLower = input.tool.toLowerCase()

if (typeof output.output !== 'string') return

// Only skip if the output indicates a tool execution failure
const outputLower = output.output.toLowerCase()
const isToolFailure =
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 (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 (typeof output.output !== 'string') return
if (output.output.startsWith("Error:") || output.output.startsWith("Failed")) return
if (output.output.includes("\nto continue:")) return

Expand Down