feat: capture Codex tool calls and results from response_item transcripts - #37
Open
ayushsingh82 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@Dhravya parses full |
…ipts parseTranscript() handled response_item user and assistant messages but dropped function_call and function_call_output entries entirely, so automatic capture lost all tool context (what command ran, what it returned) on transcripts that are mostly response_item-shaped. Tool calls and results are now recorded as "tool"-role entries, bounded to 500 chars with a truncation marker so raw tool output can't bloat a captured memory. assistant message parsing also picks up "text" content blocks alongside "output_text". signals.ts's groupEntriesIntoTurns() carries "tool" entries into a turn's captured content but doesn't scan them for signal keywords — bounded tool output is noisy and shouldn't itself trigger a capture. transcript.ts is bundled to dist/services/transcript.js so it can be unit-tested directly against transcript fixtures. Addresses supermemoryai#13 (part 1: transcript coverage). Per-project tag overrides (part 2) are a separate change.
ayushsingh82
force-pushed
the
feat/codex-response-item-transcript-coverage
branch
from
September 4, 2026 13:07
c3b6d93 to
22352ce
Compare
Contributor
Author
|
Rebased onto |
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.
Rebased onto current
main. Since this was opened,mainpicked up theresponse_itemuser/assistant message parsing and the near-duplicate dedup independently, so this PR is now just the part that's still missing: tool context.parseTranscript()still dropsfunction_callandfunction_call_outputentries, so automatic capture loses what command an agent ran and what it returned on any transcript that's mostlyresponse_item-shaped. This adds them as"tool"-role entries, each bounded to 500 chars with a[truncated, N more chars]marker so a large tool result can't bloat a captured memory. Assistant message parsing also picks uptextcontent blocks alongsideoutput_text.groupEntriesIntoTurns()insignals.tscarries"tool"entries into a turn's captured content but doesn't scan them for signal keywords — bounded tool output is noisy and shouldn't be what triggers a capture.transcript.tsis bundled todist/services/transcript.js(same pattern assession.js/tags.js/resultMerge.js) so it can be unit-tested directly against fixtures.This is part 1 of #13. Per-project tag overrides (part 2) are a separate change.
Checked:
npm run typecheck— clean.npm test— 74/74 pass, including 5 new fixture tests under "Codex transcript parsing":input_textuser extraction,output_text+textassistant extraction,function_call/function_call_outputcaptured as bounded tool entries, no double-capture when a turn appears in both theevent_msgandresponse_itemshapes, and a regression guard that legacyevent_msg-only transcripts still parse unchanged.