A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
fix(coding-agent): disable color in kernel subprocesses (#395)
kt890a002d3ace
diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.mdindex 39aa26a57f..ff0db42032 100644--- a/packages/coding-agent/CHANGELOG.md+++ b/packages/coding-agent/CHANGELOG.md@@ -2,6 +2,8 @@## [Unreleased]+- Changed IPython kernels to set `NO_COLOR=1`, preventing ANSI color escapes from inflating `%%bash` output.+## [0.3.0] - 2026-07-13- Changed daemon and headless execution to isolate each root session tree in a recoverable worker process, with protocol-v2 chunked snapshots, compact streaming, attachment-local backpressure, session leases, and unchanged print, JSON, and RPC interfaces.diff --git a/packages/coding-agent/src/core/tools/ipython.ts b/packages/coding-agent/src/core/tools/ipython.tsindex a58407d732..44b751fa13 100644--- a/packages/coding-agent/src/core/tools/ipython.ts+++ b/packages/coding-agent/src/core/tools/ipython.ts@@ -23,6 +23,9 @@ import { wrapToolDefinition } from "./tool-definition-wrapper.js";const RLM_BOOTSTRAP_BASE_CODE = `import asyncio+import os as _prime_agent_os++_prime_agent_os.environ["NO_COLOR"] = "1"try:import nest_asyncio as _prime_agent_nest_asynciodiff --git a/packages/coding-agent/test/ipython-bootstrap.test.ts b/packages/coding-agent/test/ipython-bootstrap.test.tsindex d122d4564a..2cc0ba6be8 100644--- a/packages/coding-agent/test/ipython-bootstrap.test.ts+++ b/packages/coding-agent/test/ipython-bootstrap.test.ts@@ -11,6 +11,10 @@ describe("IPython RLM bootstrap", () => {expect(buildRlmBootstrapCode()).toMatch(/^import asyncio$/m);});+ it("disables colored output for subprocesses launched by the kernel", () => {+ expect(buildRlmBootstrapCode()).toContain('_prime_agent_os.environ["NO_COLOR"] = "1"');+ });+it("guards Python skill imports so a broken skill does not abort bootstrap", () => {const code = buildRlmBootstrapCode([{@@ -62,6 +66,10 @@ describeIfKernel("IPython RLM bootstrap (real kernel)", () => {const result = await manager.execute("_t = asyncio.create_task(asyncio.sleep(0))\nprint(type(_t).__name__)");expect(result.status).toBe("ok");expect(result.stdout).toContain("Task");++ const bashResult = await manager.execute('%%bash\nprintf %s "$NO_COLOR"');+ expect(bashResult.status).toBe("ok");+ expect(bashResult.stdout).toBe("1");} finally {await manager.dispose();}