Mohamed Boudra f22f76c56b Fix Codex MCP timeline persistence after daemon restart
When daemon restarts, SESSION_HISTORY is lost because it's an in-memory
Map. This fix adds disk-based timeline loading from Codex rollout files.

Changes:
- Add loadPersistedHistoryFromDisk() method to load from rollout files
- Add helper functions for finding and parsing rollout JSONL files
- Call disk loading in connect() when resumeHandle exists but SESSION_HISTORY is empty
- Add E2E test for timeline persistence across daemon restart

The rollout files are stored at ~/.codex/sessions/<date>/rollout-*.jsonl
and contain JSONL entries with response_item and event_msg types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 19:14:51 +07:00
2025-12-25 11:31:56 +07:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%