DeepSeek Harness: ACP Non-JSON Output
A DeepSeek Harness ACP client can fail even when a session operation succeeds if a plugin writes a plain-text log into stdout, the protocol stream. Capture stdout and stderr separately and identify the emitting component before choosing a remedy.
DeepSeek Harness: why does one extra line matter?
The CLI reference identifies acp as a supplied profile whose standard input and output carry the Agent Client Protocol. In discussion #11222, a user reports that @deepseek-ai/dsh 0.2.1-rc.2 with dsh --profile acp emitted a plain-text model-listing message among newline-delimited ACP JSON-RPC frames. A strict client treated the stream as corrupt and could not create its test session.
The distinction is important: the report says session/new itself can succeed when a client ignores the stray line, yet the client still reports protocol termination. The reported text came from llm-deepseek-account during model listing. This is a user report for a particular version and environment, not proof that every non-JSON line has the same cause or that a later release has the same behavior.
| Observation | Useful interpretation | Not established by itself |
|---|---|---|
| Plain text among JSON-RPC frames | The protocol stream is contaminated | Which component printed it |
A line tagged llm-deepseek-account | Compare with the reported model-listing case | Every ACP failure is that issue |
| A client reports termination | The client could not continue its protocol exchange | The session operation never ran |
| stderr has diagnostics | Separate diagnostic stream is present | stdout is free of other output |
DeepSeek Harness: what was reproduced in the report?
The reporter used Windows 10/11, Node, the package's lib/bin.js, and --profile acp. The stated precondition was existing account credentials so that account model listing ran. The report sent an initialize request, an initialized notification, and session/new with an absolute working directory and an empty MCP server list. It observed JSON-RPC output interleaved with a line bearing the plugin tag; stderr was empty in that capture.
The report's example launch is:
node path/to/@deepseek-ai/dsh/lib/bin.js --profile acp
The path is a placeholder for the reporter's installed package, not a path that will exist on every machine. Use the actual client launcher and installed version for your comparison. Avoid creating or copying credentials merely to imitate the precondition; record whether the account listing is part of your own scenario. The report expected similar behavior on other platforms when that listing logs, but that expectation is not a verified cross-platform result.
DeepSeek Harness: how can you isolate the broken stream?
- Record the exact DSH package version, operating system, client and version, launch command, selected profile, and the operation at which the client fails. Remove personal paths and credentials from the evidence you share.
- Capture stdout and stderr as separate streams while reproducing the client's normal initialization and session creation. Preserve their order within each stream. Do not merge stderr into the protocol stream during this comparison.
- Check whether each stdout line is a protocol frame or contains unrelated text. Note the first offending line and its position relative to initialization and session creation; a plugin tag can help identify its source.
- Compare the message and version with the discussion. If they differ, investigate the relevant plugin, wrapper, or launcher instead of assuming the reported account plugin is responsible.
- After an appropriate change or update, repeat the same client probe and inspect stdout again. Check both stream purity and the client result; either one alone gives an incomplete picture.
The diagnostic capture may contain session details, working directories, tool arguments, or other private information. Keep raw captures local and sanitize a copy before sharing. Avoid changing several plugins and client settings simultaneously: that makes a before-and-after result harder to interpret.
DeepSeek Harness: how do profile composition and launch arguments affect diagnosis?
The CLI reference describes dsh <name> as shorthand for dsh --profile <name> and explains that the final profile is composed from bundle, profile, home, and explicit patch layers. Consequently, two installations using the same profile name need not have identical plugin configurations. Identify the actual profile and any wrappers or patches used by the failing client before attributing output to a shipped default.
The launcher consumes its own flags before application arguments; acp is documented with no app options. A client wrapper that emits a banner to stdout can corrupt the stream just as a plugin can, so include the wrapper in the investigation. The CLI's config dump describes an unevaluated composed tree and does not start the application. It can help trace layers, but it cannot demonstrate what a running plugin prints. A dump can initialize a missing profile, and its contents should be checked for sensitive information before sharing.
For the specific user report, the proposed fixes are routing the listing log to stderr or a logger that does not touch stdout, suppressing or redirecting that logging in the ACP profile, and adding a protocol-stream regression test. These are suggestions in the discussion, not evidence that a fix has shipped. Check the release and project discussion for the installed build rather than promising that a particular update resolves the issue.
DeepSeek Harness: what are the limits and safety boundaries?
Do not discard arbitrary stdout lines in a production client as a universal fix. A filter can hide a different protocol defect or remove meaningful data; the report only describes what happened when a client ignored the particular stray line. Likewise, redirecting all stdout to stderr would remove the protocol frames the client needs. Keep protocol and diagnostic channels distinct and verify the actual communication after any change.
A pure JSON stream does not prove that the session was created correctly or that the requested work succeeded. Check the matching response and the client's own outcome. Conversely, a failed client probe does not prove that the server performed no work; avoid repeatedly creating sessions without understanding the side effects. The sources do not establish a universal fixed version, a safe generic log filter, or a supported configuration switch that silences this plugin in every deployment.
DeepSeek Harness: what do the terms mean?
- ACP: the Agent Client Protocol carried over stdio by the documented
acpprofile. - JSON-RPC frame: a protocol message; the user report describes newline-delimited frames on stdout.
- stdout: the process output stream used for protocol traffic in this scenario.
- stderr: a separate process stream that can carry diagnostics without mixing them into stdout.
- Profile: a selected composition of bundles and configuration layers, which may differ across installations.
Frequently asked questions
Does client failure prove session creation failed?
No. The reported session operation could succeed even when a strict client rejected the extra line.
Is every non-JSON line caused by the account plugin?
No. Identify the emitting component and compare the actual version and message.
Can I redirect all stdout to stderr?
That would also divert protocol frames the client needs.
Sources
Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.
This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.