Commit 36e0307
fix(cli): only save history on successful run completion
Fixes bounty issue #1531
Previously, cortex run would create a rollout file immediately upon starting a session. If the session failed (e.g. due to an API error), this file would persist, polluting the history with failed attempts. This change ensures that if an error occurs during a new session, the rollout file is cleaned up before exiting.1 parent b4fd139 commit 36e0307
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
748 | 763 | | |
749 | 764 | | |
750 | 765 | | |
| |||
0 commit comments