Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

fix: resolve the conflict markers left in the kernel prompt strings (#2581)

Seth Karten298cf406e446
diff --git a/packages/coding-agent/src/core/kernel/bootstrap.ts b/packages/coding-agent/src/core/kernel/bootstrap.ts
index a1a55aa87d..5403026ea5 100644
--- a/packages/coding-agent/src/core/kernel/bootstrap.ts
+++ b/packages/coding-agent/src/core/kernel/bootstrap.ts
@@ -80,11 +80,7 @@ const REQUIRED_MCP_DISCOVERY_METHODS = [
"search_tools",
"describe_tool",
];
-<<<<<<< HEAD
const REQUIRED_HARNESS_METHODS = ["create_memory", "update_memory", "delete_memory"];
-=======
-const REQUIRED_HARNESS_METHODS = ["create_memory", "update_memory", "delete_memory", "record_refinement"];
->>>>>>> origin/main
export const RUNTIME_READY_CHECK = `import inspect; import rlm; from rlm import McpIntegration; import rlm.mcp as mcp; from rlm.harness import HarnessEntry; _harness_methods = ${JSON.stringify(REQUIRED_HARNESS_METHODS)}; assert callable(mcp.list_tools); assert callable(mcp.call_tool); assert all(callable(getattr(mcp, _m, None)) for _m in ${JSON.stringify(REQUIRED_MCP_DISCOVERY_METHODS)}), "rlm.mcp is missing MCP discovery methods (list_plugins, search_plugins, list_connections, search_tools, describe_tool); the kernel venv needs a current prime-agent-runtime"; assert callable(rlm.spawn); assert hasattr(rlm, 'rlm'); assert callable(rlm.rlm.spawn); assert inspect.signature(rlm.spawn).parameters['name'].default is inspect.Parameter.empty; assert not hasattr(rlm, 'run'); assert not hasattr(rlm.rlm, 'run'); assert callable(rlm.host_request); assert callable(rlm.find_models); assert callable(rlm.rlm.find_models); assert callable(rlm.create_session); assert callable(rlm.rlm.create_session); assert callable(rlm.progress_note); assert callable(rlm.rlm.progress_note); assert hasattr(rlm, 'harness'); assert hasattr(rlm, 'get_harness_state'); assert hasattr(rlm.rlm, 'harness'); assert hasattr(rlm.rlm, 'get_harness_state'); assert all(callable(getattr(_harness, _method, None)) for _harness in (rlm.harness, rlm.rlm.harness) for _method in _harness_methods); assert 'reference' in HarnessEntry.__dataclass_fields__; assert 'scope' in HarnessEntry.__dataclass_fields__; assert 'topic' in HarnessEntry.__dataclass_fields__; assert {'kind', 'topic', 'reference', 'arguments', 'global_'} <= set(inspect.signature(rlm.harness.create_memory).parameters); assert {'kind', 'topic', 'reference', 'arguments', 'global_'} <= set(inspect.signature(rlm.harness.update_memory).parameters); assert {'kind', 'global_'} <= set(inspect.signature(rlm.harness.delete_memory).parameters); assert 'global_' in inspect.signature(rlm.get_harness_state).parameters; assert not hasattr(rlm, 'background'); assert not hasattr(rlm.rlm, 'background'); from rlm.bash import BashHandle, BashResult; assert callable(rlm.bash); assert all(callable(getattr(BashHandle, _m, None)) for _m in ('tail', 'output', 'poll', 'kill')); assert {'exit_code', 'output', 'duration'} <= set(BashResult.__dataclass_fields__); import rlm.repl as _repl; assert callable(_repl.main); assert callable(_repl.emit); assert callable(_repl.host_request); assert callable(_repl.is_active); assert _repl.PROTOCOL_VERSION == 3; assert callable(rlm.emit); assert not hasattr(rlm, 'HOST_COMM_TARGET'); assert not hasattr(mcp, 'install_shutdown_hook')`;
const BOOTSTRAP_VERSION_FILE = ".bootstrap-version";
const BOOTSTRAP_VERSION_TMP_FILE = `${BOOTSTRAP_VERSION_FILE}.tmp`;
diff --git a/packages/coding-agent/src/core/prompts/rlm.ts b/packages/coding-agent/src/core/prompts/rlm.ts
index bc00a8b27b..ac48f9bfbc 100644
--- a/packages/coding-agent/src/core/prompts/rlm.ts
+++ b/packages/coding-agent/src/core/prompts/rlm.ts
@@ -44,11 +44,7 @@ const REPL_CONTROL_PROMPT = [
"",
"Python state in the kernel persists across cells: named variables, helper functions, classes, imports, notes, parsed outputs, and helper data structures all remain available in every later turn. Tool calls are themselves Python `await` expressions, so their return values can be bound to variables and composed into program logic just like any other call.",
"",
-<<<<<<< HEAD
"Continual harness state is available as `rlm.harness` and `rlm.get_harness_state()`. CRUD calls are local to this Prime Agent session by default: `rlm.harness.create_memory(title, content, kind=...)`, `rlm.harness.update_memory(id, title, content, kind=...)`, and `rlm.harness.delete_memory(id, kind=...)`, plus `rlm.harness.overview()`. Refinement events are recorded for you whenever a refinement runs. Prompt notes, skills, and subagent specs are subtypes of memory: `kind` is one of `'prompt'`, `'memory'`, `'skill'`, `'subagent'` and defaults to `'memory'`; group entries with `topic=`. Only skill entries accept `reference=` and `arguments=`. Use `global_=True` only for stable cross-session lessons; Python reserves `global`, so literal `global=True` is invalid syntax.",
-=======
- "Continual harness state is available as `rlm.harness` and `rlm.get_harness_state()`. CRUD calls are local to this Prime Agent session by default: `rlm.harness.create_memory(title, content, kind=...)`, `rlm.harness.update_memory(id, title, content, kind=...)`, and `rlm.harness.delete_memory(id, kind=...)`, plus `rlm.harness.record_refinement(...)` and `rlm.harness.overview()`. Prompt notes, skills, and subagent specs are subtypes of memory: `kind` is one of `'prompt'`, `'memory'`, `'skill'`, `'subagent'` and defaults to `'memory'`; group entries with `topic=`. Only skill entries accept `reference=` and `arguments=`. Use `global_=True` only for stable cross-session lessons; Python reserves `global`, so literal `global=True` is invalid syntax.",
->>>>>>> origin/main
"",
"Terminology: continual harness names the persisted prompt, memory, skill, and subagent layer; RLM names the runtime, Python REPL kernel, and native call interface exposed to the model.",
"",