fix: #3319 preserve nested handoff history content#3320
fix: #3319 preserve nested handoff history content#3320Aphroq wants to merge 2 commits intoopenai:mainfrom
Conversation
seratch
left a comment
There was a problem hiding this comment.
Thanks for the fix. I agree this is a real scenario: chained nest_handoff_history can receive multiline user content or structured/multimodal content, and preserving that transcript shape is important.
Before merging, could you make one small follow-up change? The new record splitter still treats a continuation line like 2. not a new record as a new summary item, so multiline string content can still be truncated when a later line happens to look like a numbered summary record.
Could we serialize role items with string content that contains newlines using the JSON record format as well? That should remove the ambiguity for newly generated summaries while keeping the legacy parser for older saved histories. Please also add a regression test for a multiline string where the second line starts with something like 2. not a new record.
fed27b7 to
6b9de69
Compare
|
Thanks for the review. I changed the formatter so role items with string content that contains I also updated the multiline regression test to use I checked the adjacent cases as well: structured/multimodal role content still round-trips through JSON, legacy multiline summaries still parse, role+name formatting is preserved for simple strings, non-role items still serialize as JSON, |
Summary
role: contentformat for simple string messages, and keep legacy summary parsing for older saved histories.Test plan
bash .agents/skills/code-change-verification/scripts/run.shIssue number
Closes #3319
Checks
make lintandmake format