openclaw - ✅(Solved) Fix [Bug]: Literal \n is rendered in config warnings/output during audits and other OpenClaw commands [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70140Fetched 2026-04-23 07:28:46
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

OpenClaw renders escaped newline sequences (\n) as literal text in CLI output instead of formatting them as real line breaks.

Root Cause

OpenClaw renders escaped newline sequences (\n) as literal text in CLI output instead of formatting them as real line breaks.

Fix Action

Fixed

PR fix notes

PR #70174: fix(cli): render real newlines in config warnings output

Description (problem / solution / changelog)

Fixes #70140

The deps.logger.warn call in src/config/io.ts:1201 used a double-escaped newline (\\n in template literal) which rendered as literal \n instead of a proper line break.

Changed \\n to \n so multi-line warnings display with actual line breaks.

File changed: src/config/io.ts

Changed files

  • src/config/io.ts (modified, +1/-1)

Code Example

Observed in terminal output while running:

openclaw security audit --deep

Example visible output:
Config warnings:\n- plugins.entries.active-memory: plugin disabled (disabled in config) but config is present

Attached screenshots show the warning rendered with a literal `\n` instead of a real newline.
The same formatting problem appears to affect other OpenClaw commands that print structured or multi-line messages.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenClaw renders escaped newline sequences (\n) as literal text in CLI output instead of formatting them as real line breaks.

Steps to reproduce

  1. Run openclaw security audit --deep (or other audit-like commands)
  2. Observe the "Config warnings" output in the terminal.
  3. Note that newline escape sequences are rendered as literal \n text.
  4. Repeat with other OpenClaw commands that print warnings or multi-line status/output.

Expected behavior

Escaped newline sequences should be interpreted before rendering, so multi-line warnings and status messages are displayed as properly formatted line breaks in the CLI output.

Actual behavior

The CLI prints literal \n characters in the output, for example:

Config warnings:\n- plugins.entries.active-memory: plugin disabled (disabled in config) but config is present

instead of rendering the warning as a multi-line block.

OpenClaw version

2026.4.21

Operating system

Debian Linux

Install method

npm

Model

NOT_RELEVANT

Provider / routing chain

NOT_RELEVANT

Additional provider/model setup details

This issue appears to affect CLI output formatting rather than model behavior or provider routing.

Logs, screenshots, and evidence

Observed in terminal output while running:

openclaw security audit --deep

Example visible output:
Config warnings:\n- plugins.entries.active-memory: plugin disabled (disabled in config) but config is present

Attached screenshots show the warning rendered with a literal `\n` instead of a real newline.
The same formatting problem appears to affect other OpenClaw commands that print structured or multi-line messages.

Impact and severity

Affected: CLI users reading warnings and diagnostic output Severity: Medium Frequency: Reproducible Consequence: Reduces readability of audit and command output, makes diagnostics look broken, and can make multi-line warnings harder to parse quickly.

Additional information

<img width="1373" height="444" alt="Image" src="https://github.com/user-attachments/assets/23ba0bc6-209a-4387-8d53-2eacdda91690" />

extent analysis

TL;DR

The issue can likely be fixed by properly interpreting escaped newline sequences in the CLI output formatting.

Guidance

  • Verify that the output is being rendered as a string literal, which might be causing the escaped newline sequences to be printed instead of being interpreted as line breaks.
  • Check the OpenClaw code for any string formatting or escaping functions that might be applied to the output, and ensure they are correctly handling newline characters.
  • Consider using a library or function that can properly interpret and render escaped newline sequences, such as a templating engine or a string formatting library.
  • Review the documentation for the openclaw security audit command to see if there are any options or configuration settings that can affect the output formatting.

Example

No code example is provided as the issue does not contain enough information about the specific code or libraries being used.

Notes

The issue seems to be specific to the CLI output formatting, and the fix might involve modifying the OpenClaw code to properly handle escaped newline sequences. However, without more information about the code or libraries being used, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround to properly interpret and render escaped newline sequences in the CLI output, such as using a string formatting library or modifying the OpenClaw code to handle newline characters correctly. This is recommended because the issue affects the readability of audit and command output, and a workaround can be implemented without waiting for a fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Escaped newline sequences should be interpreted before rendering, so multi-line warnings and status messages are displayed as properly formatted line breaks in the CLI output.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Literal \n is rendered in config warnings/output during audits and other OpenClaw commands [1 pull requests, 1 comments, 2 participants]