Fix: Preserve profile when loading subordinate agent settings (follow-up to #788)#858
Closed
Krashnicov wants to merge 1 commit intoagent0ai:developmentfrom
Closed
Fix: Preserve profile when loading subordinate agent settings (follow-up to #788)#858Krashnicov wants to merge 1 commit intoagent0ai:developmentfrom
Krashnicov wants to merge 1 commit intoagent0ai:developmentfrom
Conversation
b59833b to
6baa059
Compare
Follows up on PR agent0ai#788 (Subordinate agents settings override). When subordinate agents have a settings.json in their profile directory, the profile was getting reset to 'agent0' instead of preserving the intended profile. Root cause: initialize_agent() creates a new config with default profile, and while memory_subdir was preserved, the profile was not. Fix: Apply the same preservation pattern used for memory_subdir to profile.
6baa059 to
359bc29
Compare
Collaborator
|
@linuztx please take a look, it seems like a bug introduced with the subordinate settings override. In general we should not store memory folder or profile on the side and restore it, we should not make exceptions like this, it should not be overridden in the first place. Thanks. |
Contributor
Author
|
I think it would be useful to be able to override memory settings- particularly interval but also folders (eg if we had a specialist terraform agent that was being asked to do work on a folder) - or indeed if we could combine memory stores (want to use project folder and the default knowledge) |
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.
Related Issue
Follows up on PR #788 (Subordinate agents settings override)
Problem
When subordinate agents have a
settings.jsonin their profile directory, the profile gets reset toagent0instead of preserving the intended profile.Root Cause
In
_15_load_profile_settings.py, the extension:memory_subdirbefore callinginitialize_agent()initialize_agent(override_settings=...)which creates a NEW configprofileto"agent0"from global settingsmemory_subdirbut forgets to restoreprofileWhy working profiles work
Profiles without
settings.json(researcher, developer, hacker) skip this extension's logic entirely, so their profile is never overwritten.Solution
Apply the same preservation pattern used for
memory_subdirtoprofile:Testing
settings.json(e.g.,/agents/arachnia/settings.json)call_subordinate(profile="arachnia", reset=True)agent0arachnia✅Checklist