Skip to content

fix: defer history mkdir warning until console exists - #5672

Open
Alphaxiaoteng wants to merge 1 commit into
Aider-AI:mainfrom
Alphaxiaoteng:fix/io-console-before-history-warning
Open

fix: defer history mkdir warning until console exists#5672
Alphaxiaoteng wants to merge 1 commit into
Aider-AI:mainfrom
Alphaxiaoteng:fix/io-console-before-history-warning

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

Summary

  • Fixes Uncaught AttributeError in io.py line 979 #5669: when creating the input-history directory failed, __init__ called tool_warning before self.console existed, raising AttributeError and aborting startup.
  • Defer that warning until after console initialization, then emit it normally.
  • Add a regression that patches Path.mkdir to fail and asserts construction succeeds with input_history_file cleared.

Test plan

  • pytest tests/basic/test_io_history_mkdir.py -q → 1 passed
  • Confirmed no crash / console is available after the failed mkdir path

Made with Cursor

InputOutput called tool_warning during __init__ before self.console was
created, causing AttributeError when history directory creation failed.
Fixes Aider-AI#5669.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught AttributeError in io.py line 979

2 participants