Skip to content

Restore the system prompt after context compaction - #840

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7533-codex-path-context-compaction-regression-after-0318-adapter
Sep 10, 2026
Merged

Restore the system prompt after context compaction#840
TheGreatAxios merged 2 commits into
mainfrom
cl-7533-codex-path-context-compaction-regression-after-0318-adapter

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • After context compaction, ChatDirector and SubAgentDirector infer with the constructor system prompt so Codex requests keep instructions
  • Compacted-history adapter snapshot locks instructions plus user-summary input with no developer item

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes

Fixes CL-7533

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

CL-7533

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@TheGreatAxios
TheGreatAxios force-pushed the cl-7533-codex-path-context-compaction-regression-after-0318-adapter branch from 16451e8 to 04fe1c4 Compare September 9, 2026 22:22
@TheGreatAxios
TheGreatAxios changed the base branch from main to cl-7535-tui-askpermission-selector-renders-stale-or-mismatched September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios added this pull request to stack #856 September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios force-pushed the cl-7533-codex-path-context-compaction-regression-after-0318-adapter branch from 04fe1c4 to aa980fb Compare September 10, 2026 00:45
Base automatically changed from cl-7535-tui-askpermission-selector-renders-stale-or-mismatched to main September 10, 2026 00:48
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.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7533-codex-path-context-compaction-regression-after-0318-adapter branch from aa980fb to 06261ef Compare September 10, 2026 00:48
@TheGreatAxios
TheGreatAxios merged commit 11288c3 into main Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant