Compose a separate final reply after the work loop #49

Merged
weichen merged 3 commits from feature/final-reply-compose into main 2026-10-02 14:15:17 +00:00
Owner

Summary

  • End-of-turn rejections are system reminders, so the model does not treat them as the user speaking.
  • Evidence is numbered and the latest check on the same file wins.
  • After tools were used, the main model writes one reply aimed at the original request. Failure falls back to the draft.
  • New setting runtime.composeFinal, default on.

Test plan

  • go test for runtime, prompts, settings, and ctxasm
  • Depends on the Core pull request
## Summary - End-of-turn rejections are system reminders, so the model does not treat them as the user speaking. - Evidence is numbered and the latest check on the same file wins. - After tools were used, the main model writes one reply aimed at the original request. Failure falls back to the draft. - New setting `runtime.composeFinal`, default on. ## Test plan - [x] `go test` for runtime, prompts, settings, and ctxasm - [ ] Depends on the Core pull request
weichen added 1 commit 2026-10-02 13:46:54 +00:00
Why: End-of-turn checks were injected as user messages, so the model answered the checker instead of the user, and the last draft was treated as the reply.
Evidence: go test ./internal/runtime/ ./internal/prompts/ ./internal/settings/ ./internal/ctxasm/
Impact: Rejections are system reminders. A main-model compose step writes the user-facing reply when tools were used. Deliverable cards stay after that reply.
Refs: feature/final-reply-compose
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-02 13:53:59 +00:00
Why: The first live run wrote its deliberation, including a think block and the quality score, as the reply the user sees.
Evidence: go test ./internal/runtime/ -run TestCompose
Impact: Think blocks are stripped before the reply is stored or shown. The compose prompt forbids paths, scores, and step-by-step reasoning.
Refs: feature/final-reply-compose
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-02 14:02:21 +00:00
Why: The composed reply copied the registered artifact id and file size out of the tool summary.
Evidence: go test ./internal/runtime/ -run 'TestComposeUserPromptOmitsArtifactIDs|TestComposeReplyDropsInternalRefs'
Impact: Those tokens are removed from the compose input and from the reply before it is shown.
Refs: feature/final-reply-compose
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit 2d0b55391e into main 2026-10-02 14:15:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#49