Skip to content

The agent that grows with you

test: exercise safe identity suppression through real prompt assembly

Tekniumcccb516cd7e1
diff --git a/hermes_cli/config.py b/hermes_cli/config.py
index d366dac855b..5fbb51531e6 100644
--- a/hermes_cli/config.py
+++ b/hermes_cli/config.py
@@ -3796,11 +3796,11 @@ _inject_profile_env_vars()
def _platform_plugin_manifests():
+ """Yield ``(dir_name, manifest_dict)`` for every bundled ``plugins/platforms/*/plugin.y(a)ml``."""
from agent.safe_worker_policy import safe_worker_enabled
if safe_worker_enabled():
return
- """Yield ``(dir_name, manifest_dict)`` for every bundled ``plugins/platforms/*/plugin.y(a)ml``."""
platforms_dir = get_project_root() / "plugins" / "platforms"
if not platforms_dir.is_dir():
return
diff --git a/tests/agent/test_safe_worker_policy.py b/tests/agent/test_safe_worker_policy.py
index 35cc2f38582..987ce71366c 100644
--- a/tests/agent/test_safe_worker_policy.py
+++ b/tests/agent/test_safe_worker_policy.py
@@ -245,6 +245,10 @@ def test_bare_agent_constructor_cannot_restore_safe_customizations(tmp_path, mod
prefill_messages=[{"role": "user", "content": "PREFILL_SENTINEL"}],
save_trajectories=False)
from agent.background_review import load_background_review_settings
+ from agent.system_prompt import build_system_prompt
+ prompt = build_system_prompt(agent)
+ if mode == "safe":
+ assert "IDENTITY_SENTINEL" not in prompt
flags = [agent.skip_context_files, agent.load_soul_identity, agent.skip_background_review]
print(json.dumps({"flags": flags, "prefill": agent.prefill_messages,
"review": load_background_review_settings()[0], "reads": reads}))