feat: emit the final user message as its own capture attribute #86
No reviewers
Labels
No labels
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agent-proxy!86
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/user-message-capture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #85.
model.request.capturednow carriesagentproxy.user_messageholding theverbatim text of the final user turn.
The text was already inside
request.body, but only as the last matchingelement of a variable-length messages list. SigNoz pipeline processors
cannot address a last element:
moveandcopytake fixed field pathswith no indexing, and the
addprocessor'sEXPR(...)escape hatchreaches a known index but has no last-element form. So the projection has
to happen here, where the position is known.
The field is a convenience projection beside the complete body, never a
selected-field capture mode, so extraction is total. An absent, empty, or
unreadable user message omits the field rather than failing a capture that
would otherwise have succeeded. String content and the content-parts form
are both handled, with non-text parts ignored and text parts joined.
Trailing tool rounds are the case that motivated reading backwards for the
last
userrole rather than taking the last element, since a tool-usingturn ends on a tool result.
Adding an optional field is backward compatible, so the capture schema
version stays at 1. No consumer pins it.
Gates: ward exec format-check, lint, typecheck, and test all pass, 248
tests including 8 new ones.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Co-authored-by: Kai Siren coilysiren@gmail.com
Co-authored-by: Claude noreply@anthropic.com