Issue
The exception, of course, was my fault, but the symptoms were mystifying: all subsequent prompts would do nothing until I restarted aider. Troubleshooting was not fun.
Here's a sample fix:
diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py
index f9564a61b..2c7b1d89f 100755
--- a/aider/coders/base_coder.py
+++ b/aider/coders/base_coder.py
@@ -1323,10 +1323,18 @@ class Coder:
if isinstance(exception, SwitchCoder):
await self.io.output_task
raise exception
+ self.io.tool_error(f"Error during generation: {exception}")
+ if self.verbose:
+ traceback.print_exception(
+ type(exception), exception, exception.__traceback__
+ )
# Stop spinner when processing task completes
self.io.stop_spinner()
+ # and stop monitoring the output task
+ self.io.output_task = None
+
await self.auto_save_session()
await asyncio.sleep(0.01) # Small yield to prevent tight loop
Note that we have to clear self.io.output_task to avoid infinite output. Breaking the while loop prevented any output, and raising the exception caused a tight infinite loop elsewhere.
Version and model info
Aider v0.88.27
Issue
The exception, of course, was my fault, but the symptoms were mystifying: all subsequent prompts would do nothing until I restarted aider. Troubleshooting was not fun.
Here's a sample fix:
Note that we have to clear
self.io.output_taskto avoid infinite output. Breaking thewhileloop prevented any output, and raising the exception caused a tight infinite loop elsewhere.Version and model info
Aider v0.88.27