DeepSeek Harness: Pass a Literal -- to an App
To deliver a literal -- to a DeepSeek Harness application at the launcher boundary, write -- --: the launcher consumes the first token and passes the second to the selected profile's application arguments. Whether the application then accepts or interprets that token is a separate question.
DeepSeek Harness: where is the argument boundary?
The CLI behavior reference describes two audiences for the same command line. The launcher selects a profile and handles its own options. Once it encounters the first token it does not recognize, that token and the rest are passed to the selected profile through ctx.cmdlineArgs. Application plugins can parse that shared snapshot. The architecture reference describes a profile as a composition of bundles and patches: selecting one determines which application plugins can consume those arguments.
There is also an explicit separator. At the launcher boundary the parser consumes one --. If the application itself needs to receive a literal double dash, place a second -- after it. The first is a boundary marker for the launcher; the second is an application argument. They are separate tokens, so the space matters. This rule describes what reaches the application argument snapshot, not what a particular application does with it.
| Command-line part | Reader | Effect |
|---|---|---|
| Profile and launcher flags before the boundary | Launcher | Select and prepare the profile |
First -- at the launcher boundary | Launcher | Consumed as the separator |
Second -- | Application argument snapshot | Passed as a literal token |
| Remaining tokens | Application plugins | Parsed, rejected, or ignored according to the composition |
DeepSeek Harness: how do you put the tokens in order?
Use the following as a schematic invocation for a profile whose application has documented a need for a literal separator:
dsh --profile <name> -- --
Replace <name> with the intended profile name. This illustrates the launcher's documented token handling; it is not a promise that any particular bundled application accepts a lone --, nor a command to run with the angle-bracket placeholder unchanged. If an application needs other arguments, put them in the order its own reference specifies. Do not infer an application's grammar solely from the launcher's separator rule.
- Identify the profile and the application plugin that is supposed to parse the arguments. Consult its own help or documentation for the intended argument sequence.
- Place launcher options, such as the profile selection, before the boundary. In the documented model, launcher options must precede application arguments.
- At the launcher boundary, supply
-- --when the application must receive a literal--. Count two distinct tokens. - Add any application arguments according to that application's documented grammar. Record the exact invocation and the result when troubleshooting.
- Check the application's response. A passed token can still be rejected, have application-specific meaning, or be ignored when no mounted plugin reads it.
The CLI reference states that ctx.cmdlineArgs.get() is a shared immutable read: several plugins may parse the same snapshot. It also says a profile without a reader ignores its application arguments. That means delivery to the snapshot is not proof that an intended parser acted on the value.
DeepSeek Harness: what happens without an explicit separator?
The launcher stops processing its own flags at the first token it does not recognize. The reference gives dsh --profile web --port 8080 as an example: --port is an application option, so it and the following value are delivered to the Web application. This illustrates the implicit boundary; it does not establish that all options with the same spelling belong to every profile.
After the application argument boundary, tokens are no longer launcher flags. A launcher option placed there cannot be relied on to select or alter the launcher. Conversely, placing a launcher-recognized option where the launcher is still parsing may prevent the application from receiving it as intended. The explicit separator is useful when the desired boundary needs to be unambiguous, especially when a token has meaning to both layers.
The shorthand dsh <name> is permitted only when the name immediately follows dsh. The word plugin immediately after dsh selects plugin management; to boot a profile actually named plugin, the reference uses dsh --profile plugin. Once a profile has been selected, plugin and web are ordinary application arguments. Repeating --profile before application arguments, including after a shorthand profile, is rejected. These details matter when reconstructing which parser received a token.
DeepSeek Harness: how can help and rejection narrow a problem?
The reference distinguishes dsh --help, which prints launcher help when there is no profile to receive application arguments, from dsh --profile web --help, which prints that application's help without starting it. A help request exits with status 0; rejected application arguments request a nonzero exit. The dependent configuration rows do not activate in either case. Help is therefore useful for finding the selected application's grammar, but it is not a runtime test of the application.
If a command fails, compare the exact token sequence against both references. First establish whether the profile was selected. Then determine where launcher parsing ended, whether one separator was consumed, and what the application was expected to receive. Finally check whether the selected composition includes an argument reader and whether that reader accepts the sequence. A nonzero result alone does not identify which of those stages failed; inspect the diagnostic.
The bundled profiles do not share one argument contract. The CLI reference lists Web options such as --host, --port and --no-open, while headless accepts task text as a positional argument. The sdk, sdk-minimal and acp profiles have no options in that table and use their respective stdio protocols. The double-dash rule does not add an option to any of them. For example, a literal separator delivered to an application should not be assumed to become task text or a network setting without that application's own documented behavior.
DeepSeek Harness: what are the limits and safety considerations?
Arguments can alter application behavior. Check the target profile's documentation and avoid including credentials or sensitive task material in a command you will share. A copied example may select a different composition on another installation; confirm the actual profile and its plugins. Passing a separator does not validate subsequent arguments or make their effects safe.
The CLI also describes an important configuration interaction: application argument providers can expose services read by configuration expressions. Replacing an entire configuration row with a literal can remove that runtime read. Thus, if a documented option is delivered but an observed setting differs, inspect the relevant configuration and provider as well as the tokens. The separator rule alone does not prove a particular effective setting.
Do not use profile reset or configuration dump options as a casual substitute for testing argument delivery. In particular, the documented dump modes reject application arguments, and --from-default-profile can replace an existing custom profile. Consult the CLI reference before changing a profile merely to investigate its command line.
DeepSeek Harness: what do the terms mean?
- Launcher: the
dshlayer that selects a profile and parses its own options. - Profile: a named composition of bundles and patches that determines which application plugins are mounted.
- Argument boundary: the point after which tokens are delivered as application arguments instead of launcher options.
- Literal
--: an application token; at the launcher's explicit boundary it requires a second--after the consumed separator. ctx.cmdlineArgs: the shared application-argument snapshot that mounted plugins can read.
Frequently asked questions
How do I pass a literal double dash?
At the launcher boundary, write two separate tokens, -- --; the launcher consumes the first and passes the second.
Does the application have to accept it?
No. Its own argument parser determines whether the token is accepted, interpreted or rejected.
Where do launcher flags go?
Place them before application arguments; the launcher stops parsing its flags at the first unrecognized token.
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.