Skip to content
Merged
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
9 changes: 2 additions & 7 deletions hooks/stop-hook.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,7 @@ The loop state file has been removed. Tell the user Clone could not produce a sa

block(`${predictedPromptSection}

The user-configured confidence threshold was met. The prediction cleared
confidence ${Number(predictedConfidence).toFixed(5)}. Evaluate
The user-configured confidence threshold was met. Evaluate
the prediction in context, then continue as if the user had provided the
predicted prompt when it is consistent with the current task state.
Prediction reasoning: ${prediction.reasoning || ''}
Expand Down Expand Up @@ -444,13 +443,9 @@ Prediction reasoning: ${prediction.reasoning || ''}
})
block(`Clone Loop requires human escalation.

Clone was not confident enough to continue automatically.
- status: ${prediction.status || ''}
- confidence: ${Number(predictedConfidence).toFixed(5)}
- threshold: ${cloneThreshold}

${predictedPromptSection}

Clone was not confident enough to continue automatically.
The loop state file has been removed. Tell the user Clone was not confident enough and wait for human input.`, 'Clone Loop stopped because Clone confidence was below threshold.')
}

Expand Down
2 changes: 1 addition & 1 deletion tests/stop-hook-v2.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('Clone Loop v2 stop hook', () => {
const output = JSON.parse(result.stdout)
assert.equal(output.decision, 'block')
assert.match(output.reason, /Commit this and move on\./)
assert.match(output.reason, /confidence 0\.91/)
assert.match(output.reason, /Confidence: 0\.91000/)
assertProminentPredictedPrompt(output.reason, 2, 'Commit this and move on.')
assert.doesNotMatch(output.reason, /mcp__clone__predict_next_prompt/)

Expand Down
Loading