fix(agent): preserve global SOUL identity across isolated runs - #28061
fix(agent): preserve global SOUL identity across isolated runs#28061nuriygold wants to merge 1 commit into
Conversation
|
Reviewer note:
|
teknium1
left a comment
There was a problem hiding this comment.
Thanks for chasing this. The underlying bug class is real on current main: agent/system_prompt.py:92 only loads SOUL when load_soul_identity is true or skip_context_files is false, and call sites such as tools/delegate_tool.py:1187, gateway/platforms/feishu_comment.py:1082, and hermes_cli/cli_agent_setup_mixin.py:384 still set skip_context_files=True without forcing SOUL.
Problems
- Current main added
--safe-modeas a fully sterile troubleshooting mode (hermes_cli/main.py:2238-2248). This PR’s global default flip would make that path keep SOUL unless safe-mode explicitly passesload_soul_identity=False. - The CLI hunk is stale: current main constructs the CLI agent in
hermes_cli/cli_agent_setup_mixin.py:343-385, while this PR patches the oldcli.pysite. GitHub reportsmergeStateStatus=DIRTY. - The default flip affects every direct
AIAgent(skip_context_files=True)caller, not only the intended runtime surfaces; sterile paths such asbatch_runner.py:344need explicit opt-out, and the current tree should be audited for siblings.
Suggested changes
- Keep
--ignore-rulesand--safe-modeseparate: preserve SOUL for the former if desired, but forceload_soul_identity=Falsefor safe-mode. - Apply the CLI wiring in
hermes_cli/cli_agent_setup_mixin.pyand explicitly annotate each current skip-context caller as identity-preserving or sterile.
Automated hermes-sweeper review.
| @@ -125,7 +125,7 @@ def init_agent( | |||
| thread_id: str = None, | |||
There was a problem hiding this comment.
This global default flip also affects sterile troubleshooting/eval paths. On current main, --safe-mode is documented as disabling all customizations while setting HERMES_IGNORE_RULES, so salvage needs either an explicit load_soul_identity=False safe-mode path or narrower opt-in at the intended runtime constructors.
|
Independent reproduction on current main confirms the delegate-specific bug: The child-specific hunk plus regression test directly fixes that defect. Scope suggestion: consider splitting that narrow bug fix from the broader default change to |
|
I opened #79052 as a narrow, current-main replacement for the delegate-specific part of this PR. It preserves |
Summary
load_soul_identityto on so isolated agent forks still keep the global operator identity--ignore-rules/HERMES_IGNORE_RULESTest Plan