Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
AiderAdapter, a new optional compatibility backend for the Aider CLI, following the sameAgentAdaptercontract as the existing Claude Code / GenericAgent / mini-swe-agent adapters. Aider has a large, active user base and no existing adapter, so this extends Bayesian Skill evolution to another widely-used coding harness without vendoring any of its code.What's added
bayesian_agent/adapters/aider.py—AiderAdapterdataclass:--message-file(avoidsARG_MAXissues with large skill-context prompts and leaves an inspectable prompt file per workspace, instead of--message/argv).ClaudeCodeAdapter's cleanup behavior (including killing orphaned child processes on timeout).parse_resultextracts token usage and cost from Aider's stdout (Tokens: X sent, Y received. Cost: $Z session.), includingk/msuffix handling, since Aider's CLI output isn't JSON like Claude Code's.load_run_from_workspacefor resuming/repairing from prior runs.aiderpackage — pure CLI subprocess boundary.bayesian_agent/adapters/__init__.py.experiments/run_benchmarks.py: new--harness aiderchoice,--aider-cli/--aider-timeout/--aider-auto-commits/--aider-yes-alwaysflags, backend construction branch, andagent_name_for_harnessentry.docs/adapters.md: new "Aider Adapter" section matching the existing adapter doc structure.README.md: Aider added alongside GenericAgent / mini-swe-agent / Claude Code in the feature list, compatibility-backends list, and file listing.tests/test_adapters.py: 7 new tests mirroring the existing adapter test conventions — command construction, token/cost parsing, task boundary, timeout handling, child-process cleanup on timeout, workspace-log recovery, and the "does not import eagerly" guarantee. All use a fake CLI script ascli_path, no realaiderinstall required.Testing
python3 -m pytest tests/ -q
89 passed
All 89 existing + new tests pass, including the 7 new Aider-specific tests and the full existing suite (no regressions in other adapters).
Notes
--message-file,--yes-always,--auto-commits/--no-auto-commits,--no-stream,--no-pretty,--check-update/--no-check-update,--analytics/--no-analytics) were verified against Aider's current CLI options reference rather than assumed.