Description
Spec generation gets stuck in an infinite loop where the internal Stop hook repeatedly demands the agent call a "StructuredOutput" tool, but the agent never does.
Environment
- OS: Windows 11
- Node.js: v22.17.1
- Automaker: Latest (cloned fresh today, Jan 12 2026)
- Authentication: Claude Code CLI OAuth (Max subscription)
Steps to Reproduce
- Fresh clone of automaker repo
npm install
npm run dev:electron
- Create a new project
- Attempt to generate a spec for any feature
Expected Behavior
Spec generation completes and produces a specification document.
Actual Behavior
The agent gets stuck in a loop. Server logs show repeated messages like:
[SpecRegeneration] User message (tool result): {
"type": "user",
"message": {
"role": "user",
"content": [{
"type": "text",
"text": "Stop hook feedback:\nYou MUST call the StructuredOutput tool to complete this request. Call this tool now."
}]
},
"isSynthetic": true
}
The isSynthetic: true indicates these are internal Automaker messages, not external hooks.
This loop continues indefinitely (tested 500+ iterations), accumulating text but never completing.
Investigation Notes
- Initially suspected external Claude Code hooks were interfering
- Completely disabled all external hooks (renamed ~/.claude/hooks folder)
- Problem persists identically with no external hooks
- The "Stop hook feedback" is internal to Automaker's spec regeneration flow
- Agent receives text responses but never calls the StructuredOutput tool
Logs
Stream message count reaches 500+ with pattern:
- Assistant sends text response (~38 chars each iteration)
- Synthetic user message demands StructuredOutput tool call
- Repeat indefinitely
Total accumulated text grows (e.g., "total now: 8930 chars") but spec never completes.
Description
Spec generation gets stuck in an infinite loop where the internal Stop hook repeatedly demands the agent call a "StructuredOutput" tool, but the agent never does.
Environment
Steps to Reproduce
npm installnpm run dev:electronExpected Behavior
Spec generation completes and produces a specification document.
Actual Behavior
The agent gets stuck in a loop. Server logs show repeated messages like:
The
isSynthetic: trueindicates these are internal Automaker messages, not external hooks.This loop continues indefinitely (tested 500+ iterations), accumulating text but never completing.
Investigation Notes
Logs
Stream message count reaches 500+ with pattern:
Total accumulated text grows (e.g., "total now: 8930 chars") but spec never completes.