Commit 2b755fe
authored
feat: clean up session reloadin (#1481)
simplify agent reconnection
## Problem
The agent service had separate code paths for handling session reconnection between Codex and Claude adapters, leading to code duplication and inconsistent handling.
## Changes
- Consolidated the reconnection logic for both Codex and Claude adapters into a single code path
- Moved PostHog JSONL hydration to be Claude-specific (non-Codex adapters) while keeping it within the unified flow
- Both adapters now use `unstable_resumeSession` method, with Claude delegating to SDK's resumeSession and Codex delegating to codex-acp's loadSession internally
- Added clarifying comments explaining the different internal implementations for each adapter1 parent de21189 commit 2b755fe
1 file changed
Lines changed: 19 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 695 | + | |
705 | 696 | | |
706 | 697 | | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
718 | 712 | | |
719 | 713 | | |
720 | 714 | | |
721 | 715 | | |
722 | 716 | | |
723 | 717 | | |
724 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
725 | 723 | | |
726 | 724 | | |
727 | 725 | | |
| |||
0 commit comments