diff --git a/backend/app/services/openclaw/provisioning.py b/backend/app/services/openclaw/provisioning.py index 79a13ae2..0d2534a3 100644 --- a/backend/app/services/openclaw/provisioning.py +++ b/backend/app/services/openclaw/provisioning.py @@ -1004,7 +1004,8 @@ def _should_include_bootstrap( def _wakeup_text(agent: Agent, *, verb: str) -> str: return ( f"Hello {agent.name}. Your workspace has been {verb}.\n\n" - "Start the agent, read AGENTS.md, and begin heartbeats after startup." + "Start the agent. If BOOTSTRAP.md exists, read it first, then read AGENTS.md. " + "Begin heartbeats after startup." ) diff --git a/backend/tests/test_agent_provisioning_utils.py b/backend/tests/test_agent_provisioning_utils.py index 27a88370..f5529e3b 100644 --- a/backend/tests/test_agent_provisioning_utils.py +++ b/backend/tests/test_agent_provisioning_utils.py @@ -56,6 +56,14 @@ def test_workspace_path_preserves_tilde_in_workspace_root(): assert agent_provisioning._workspace_path(agent, "~/.openclaw") == "~/.openclaw/workspace-alice" +def test_wakeup_text_includes_bootstrap_before_agents(): + agent = _AgentStub(name="Alice") + + text = agent_provisioning._wakeup_text(agent, verb="created") + + assert "If BOOTSTRAP.md exists, read it first, then read AGENTS.md." in text + + def test_agent_lifecycle_workspace_path_preserves_tilde_in_workspace_root(): assert ( AgentLifecycleService.workspace_path("Alice", "~/.openclaw")