feat(acp): capture typed Codex final answers - #13
Merged
Conversation
Signed-off-by: Reinhold <310554180+reinhold-ph@users.noreply.github.com>
cmyk
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Codex ACP exposes an adapter-typed final-answer phase, but
buzz-acpcurrently reduces a completed prompt to a stop reason and discards the classified assistant response. Host-managed reply delivery needs a narrow, fail-closed result boundary before any routing, signing, persistence, or publication work can be added safely.This PR introduces that classifier boundary only. It does not publish messages or change the user-visible delivery path.
What changed
agent_message_chunkupdates carrying_meta.codex.phase = final_answerfor the active ACP sessionmessageId, text content, one unambiguous message group, and the exact canonicalend_turnterminal responsePromptResultSafety properties
The classifier returns no deliverable answer for cancellation, refusal, timeout/error paths, noncanonical terminal spellings, blank text/IDs, multiple final-answer IDs, wrong-session updates, malformed tool boundaries, malformed content, or resource-limit exhaustion.
Related work
No direct duplicate was found. This classifier is complementary to block#4648 (empty-turn observability) and is a prerequisite for addressing silent/manual delivery failures tracked in block#2459 and block#5322.
Verification
cargo fmt --all -- --checkcargo check -p buzz-acpcargo clippy -p buzz-acp --lib -- -D warningscargo test -p buzz-acp --lib— 749 passed, 0 failedgit diff --checkScope and next gate
This is the classifier prerequisite for host-managed ordinary-reply delivery. It does not yet provide a UI-testable latency improvement. The next separately reviewed slice must consume this typed result to derive the trusted route and perform durable/idempotent host delivery without another model inference.