Commit 8869cea
fix: discard follow-up passes that made no tool calls (#179)
Follow-up responses that contain only narration, refusals, or re-statements
of the original answer are now discarded before concatenation. This catches
the "split personality" pattern where the follow-up evaluator finds an
opportunity but the LLM refuses or scope-polices instead of acting —
producing contradictory content appended to an otherwise clean response.
The check counts FunctionCallContent (native path) and [Tool result for ...]
messages (text-based path) added during the follow-up loop. Zero tool calls
means the follow-up added no new information and is dropped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c65b262 commit 8869cea
1 file changed
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1151 | 1154 | | |
1152 | 1155 | | |
1153 | 1156 | | |
1154 | 1157 | | |
1155 | 1158 | | |
1156 | 1159 | | |
1157 | 1160 | | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1158 | 1174 | | |
1159 | | - | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
1160 | 1188 | | |
1161 | 1189 | | |
1162 | 1190 | | |
| |||
0 commit comments