Skip to content

Retry empty final answers#3293

Merged
esengine merged 1 commit into
esengine:main-v2from
GTC2080:GTC/issue-3290-empty-final-retry
Jun 6, 2026
Merged

Retry empty final answers#3293
esengine merged 1 commit into
esengine:main-v2from
GTC2080:GTC/issue-3290-empty-final-retry

Conversation

@GTC2080
Copy link
Copy Markdown
Contributor

@GTC2080 GTC2080 commented Jun 5, 2026

Summary

Fixes #3290.

  • Treat a no-tool-call model turn with no visible answer text as incomplete instead of ending the user turn.
  • Add a bounded retry that asks the model to continue and produce a visible answer, while preserving the existing tool-call and final-readiness gates.
  • Add regression coverage for reasoning-only replies and repeated empty replies, plus a microbenchmark for the visible-answer check.
  • Update the statusline cache fixture so usage seeding still uses a valid visible assistant reply.

Validation

  • go test ./internal/agent -run "TestRun(RetriesReasoningOnlyFinalAnswer|StopsAfterRepeatedEmptyFinalAnswers)$" -count=1 (failed before the fix, passes after)
  • go test ./internal/agent -run "TestRun(RetriesReasoningOnlyFinalAnswer|StopsAfterRepeatedEmptyFinalAnswers)$" -bench BenchmarkHasVisibleFinalAnswer -benchmem -count=5
    • normal visible answer: ~1.7-1.9 ns/op, 0 allocs/op
    • 256 leading spaces: ~90-91 ns/op, 0 allocs/op
    • all-space input: ~250-260 ns/op, 0 allocs/op
  • go test ./internal/agent -count=1
  • go test ./internal/provider/openai ./internal/control -count=1
  • go test ./internal/cli -run TestStatuslineKeepsCacheRatesInPrimaryDataRow -count=1
  • go test ./... -p 1 -count=1
  • go vet ./...
  • go test ./... -p 1 -count=1 from desktop/
  • npm run build from desktop/frontend/ after generating local Wails bindings and refreshing local dependencies from the lockfile
  • npm run test:todo-visibility from desktop/frontend/ -> 200,000 checks in 0.95 ms
  • git diff --check

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 5, 2026
@esengine esengine merged commit 42eebaf into esengine:main-v2 Jun 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Reasonix时不时发生"只思考不回复"现象,思考完了以后就真的结束了,没有输出和回复

2 participants