Commit 5503420
fix(rotation): always set CLAUDE_CONFIG_DIR explicitly, add session reset on rotate
- Remove ~/.claude special case in switch_account() — CLAUDE_CONFIG_DIR is
now always set explicitly for all rotation accounts. Using the default
~/.claude dir caused both accounts to share the same rate limit pool
when credentials resolved to the same org.
- Each rotation account must use a dedicated config dir (e.g.,
~/.claude-account1, ~/.claude-account2) with separate credentials.
- Add reset_session("account_rotation") on successful rotation to prevent
"No conversation found" errors from resuming account 1's session on
account 2.
- Update tests to reflect new always-set behavior (61/61 pass).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4e86bf4 commit 5503420
File tree
4 files changed
+23
-33
lines changed- lib
- tests/unit
4 files changed
+23
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
243 | 241 | | |
244 | 242 | | |
245 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| 1755 | + | |
1755 | 1756 | | |
1756 | 1757 | | |
1757 | 1758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | 777 | | |
781 | 778 | | |
782 | | - | |
783 | | - | |
| 779 | + | |
784 | 780 | | |
785 | 781 | | |
786 | | - | |
787 | | - | |
| 782 | + | |
| 783 | + | |
788 | 784 | | |
789 | 785 | | |
790 | 786 | | |
| |||
793 | 789 | | |
794 | 790 | | |
795 | 791 | | |
796 | | - | |
797 | | - | |
| 792 | + | |
| 793 | + | |
798 | 794 | | |
799 | 795 | | |
800 | 796 | | |
801 | | - | |
802 | | - | |
803 | 797 | | |
804 | 798 | | |
805 | | - | |
| 799 | + | |
806 | 800 | | |
807 | 801 | | |
808 | 802 | | |
| |||
830 | 824 | | |
831 | 825 | | |
832 | 826 | | |
833 | | - | |
| 827 | + | |
834 | 828 | | |
835 | | - | |
| 829 | + | |
836 | 830 | | |
837 | 831 | | |
838 | 832 | | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | 833 | | |
843 | | - | |
| 834 | + | |
844 | 835 | | |
845 | | - | |
846 | 836 | | |
847 | 837 | | |
848 | 838 | | |
0 commit comments