diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py index 5a65e6d8..86252fc0 100644 --- a/src/specify_cli/__init__.py +++ b/src/specify_cli/__init__.py @@ -2731,7 +2731,8 @@ def agent_switch( ) options["agent_switch_error"] = ( f"Switch to '{agent_id}' failed after teardown of " - f"'{current_agent}'. Restore manually." + f"'{current_agent}'. Run 'specify init --here --agent " + f"{current_agent}' to restore." ) init_options_file.write_text( json.dumps(options, indent=2), encoding="utf-8" diff --git a/tests/test_agent_pack.py b/tests/test_agent_pack.py index e3b66057..ff258a00 100644 --- a/tests/test_agent_pack.py +++ b/tests/test_agent_pack.py @@ -344,7 +344,7 @@ class TestDefaultBootstrap: data["command_registration"]["commands_dir"] = "" m = AgentManifest.from_dict(data) b = DefaultBootstrap(m) - with pytest.raises(AgentPackError, match="empty commands_dir"): + with pytest.raises(AgentPackError, match=f"Agent '{m.id}' has an empty commands_dir"): b.agent_dir(tmp_path)