diff --git a/aider/io.py b/aider/io.py index f8cf78cd3..46621cfce 100644 --- a/aider/io.py +++ b/aider/io.py @@ -308,9 +308,11 @@ class InputOutput: self.yes = yes self.input_history_file = input_history_file + Path(self.input_history_file).parent.mkdir(parents=True, exist_ok=True) self.llm_history_file = llm_history_file if chat_history_file is not None: self.chat_history_file = Path(chat_history_file) + self.chat_history_file.parent.mkdir(parents=True, exist_ok=True) else: self.chat_history_file = None