Restore the system prompt after context compaction - #840
Conversation
TheGreatAxios
left a comment
There was a problem hiding this comment.
Critic · Comment
Post-compact ChatDirector and SubAgentDirector infer actions now carry the constructor systemPrompt. Codex buildRequest still maps that field to instructions with no developer item. Adapter snapshot locks compacted history.
No blocking findings.
Keep: director compact-resume assertions, subagent overflow resume systemPrompt, open-task nudge keeps stable-base plus ephemeralTurns, compacted-history adapter snapshot.
TheGreatAxios
left a comment
There was a problem hiding this comment.
Verdict: approve (cannot GitHub-approve own PR).
CL-7533 holds at 16451e8f. ChatDirector and SubAgentDirector default constructor systemPrompt on infer rewrite, so compaction resume and ChatDirector abort recovery keep Codex instructions. Compacted-history adapter test locks instructions + user-summary input with no developer item. Explicit systemPrompt still wins via ??.
No blocking findings. File-for-later: the two injection sites still inline the same default instead of a shared production helper (HEAD title said "share the helper"; the shared helper is the test factory).
TheGreatAxios
left a comment
There was a problem hiding this comment.
Verdict: approve (GitHub cannot approve own PR).
CL-7533 holds at 16451e8f. ChatDirector and SubAgentDirector default constructor systemPrompt on infer rewrite, so compaction resume and ChatDirector abort recovery keep Codex instructions. Compacted-history adapter test locks instructions + user-summary input with no developer item. Explicit systemPrompt still wins via ??.
No blocking findings. File-for-later: the two injection sites still inline the same default instead of a shared production helper (HEAD title said share the helper; the shared helper is the test factory).
16451e8 to
04fe1c4
Compare
04fe1c4 to
aa980fb
Compare
Compaction resume inferred without the constructor prompt, so Codex requests dropped instructions. Default systemPrompt at the infer rewrite layer so the operating prompt survives; explicit values still win.
aa980fb to
06261ef
Compare
Summary
Verification
bun run typecheck,bun run build, andbun run testpassbun run checkpassesFixes CL-7533