Fix: Preserve profile when loading subordinate agent settings (follow-up to #788) #858
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