Replies: 3 comments
|
I don't like this approach. It addresses a model-level problem at the wrong level and effectively changes the signal contract from "marker appears in output" to "marker must be at the tail", which is a real behavior change with real risks. I've seen plenty of runs where claude emits a proper, intended signal and then follows it with a short explanation or summary — with the tail check that whole class of runs starts getting rejected as "self-corrected". And on top of that, custom review scripts and codex wrappers that do signal-then-summary would break silently. Also, any threshold (50 chars, "substantial prose", etc.) is a heuristic we'd have to live with. #92 and #93 were intentionally fixed at the prompt level to avoid exactly this kind of second-guessing, and I'd rather stay consistent with that. I'd prefer to push back on the model first. The Path B instruction is already explicit, but opus 4.7 still misfired — so the prompt clearly isn't strong enough for it yet. Worth experimenting with:
If prompt-only tweaks don't move the needle on opus 4.7 across a few runs, we can revisit. But I don't want to ship a tail-position check as the primary defense. |
|
transfering to discussions |
|
fair points, and i get the reasoning. keeping the signal contract clean and pushing fixes to the prompt layer is consistent with #92/#93. my concern is that prompt-level fixes assume stable instruction-following from the model. anthropic's models have been drifting week-to-week on that. what holds on opus 4.7 today may not hold after the next silent update. the current path b wording is already pretty explicit. the model even quotes it back verbatim in the same response where it misfires. that suggests the failure mode isn't "prompt too vague" but "model emitted before finishing its own reasoning", which is harder to close with wording alone. on frequency: this only happened a few times and only on opus 4.7, which may itself be a bad sign. a newer model regressing on something |
Uh oh!
There was an error while loading. Please reload this page.
problem
during the first claude review phase, claude can emit a signal marker, immediately realize the mistake in plain text, and keep working correctly - but ralphex has already captured the premature signal and terminates the run as failed.
real log excerpt (opus 4.7, first claude review):
what actually happened: claude found 3 issues, fixed them, ran tests (5/5 pass), committed, then mistakenly emitted TASK_FAILED, then self-corrected in the next blocks quoting "path b" from the prompt verbatim. per path b in
review_first.txt:83-87, no signal should have been emitted at all - another review iteration should run to verify the fixes. ralphex aborted the whole run instead.prior art
the existing approach on similar bugs is known:
in this case the prompt is already explicit (
review_first.txt:83-87describes path b in plain text, claude even quotes it back verbatim), yet opus 4.7 still emits the signal first and self-corrects after. further prompt tuning may reduce the frequency but cannot rule out mid-output mistakes - the model has no way to "unsay" a marker it already emitted.proposed approach (non-intrusive code fix)
instead of the current stream-time behavior in
pkg/executor/executor.go:401-403:which captures the first signal marker and never releases it, scan the accumulated output from the tail after claude exits:
<<<RALPHEX:...>>>marker in the full output.this does not parse semantics, does not second-guess the llm's decision, and does not introduce keyword heuristics. it only answers one mechanical question: "did the model stop talking right after emitting the marker, or did it keep going?" a signal that is not the end of the output was, by observation, never intended as the final verdict.
why this is different from #92
#92's rejected guard re-evaluated the codex output in go (re-parsing findings) to override claude's decision. the proposed tail check does the opposite: it trusts whatever claude said last, and treats mid-output markers as incomplete drafts. there is no re-evaluation of the review itself.
edge cases
All reactions