Follow-up to #1023 (partially addressed by #994, which added isSidechain to LARGE_ROOT_FIELDS).
parseLargeJsonl (src/parser.ts) still drops promptSource for lines > 32 KB, which is exactly where SDK-generated prompts live. #1021's recurring-context detector works around it by regex-scanning the raw line's head/tail (isMachineWrittenPrompt, src/optimize.ts). Proper fix: add promptSource to LARGE_ROOT_FIELDS (tiny scalar, add-only), then delete the head/tail workaround and rely on the parsed field. Add a > 32 KB fixture with promptSource: "sdk" to tests/parser-large-json-scanner.test.ts and assert the recurring-context detector still excludes it. Cache impact: none (promptSource is read at parse time; verify whether it needs to be persisted on CachedFile for the optimize path — if it does, that is add-only like isSidechain).
Follow-up to #1023 (partially addressed by #994, which added
isSidechaintoLARGE_ROOT_FIELDS).parseLargeJsonl(src/parser.ts) still dropspromptSourcefor lines > 32 KB, which is exactly where SDK-generated prompts live. #1021'srecurring-contextdetector works around it by regex-scanning the raw line's head/tail (isMachineWrittenPrompt,src/optimize.ts). Proper fix: addpromptSourcetoLARGE_ROOT_FIELDS(tiny scalar, add-only), then delete the head/tail workaround and rely on the parsed field. Add a > 32 KB fixture withpromptSource: "sdk"totests/parser-large-json-scanner.test.tsand assert the recurring-context detector still excludes it. Cache impact: none (promptSourceis read at parse time; verify whether it needs to be persisted onCachedFilefor the optimize path — if it does, that is add-only likeisSidechain).