dsh-continue
Safe configurable continuation and network recovery bundle for DeepSeek Harness.
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 25, 2026
- Updated
- Aug 25, 2026
Introduction
dsh-continue
Chinese version: docs/README.zh-CN.md
dsh-continue provides opt-in unattended continuation policies for DeepSeek Harness:
- Recover transient network failures after the built-in short retry loop is exhausted.
- Select the one explicitly recommended option in a structured question.
- Optionally confirm a safe, unambiguous binary continuation question.
- Optionally accept a valid Plan Mode exit request.
- Optionally handle narrow plain-text continuation prompts.
Every executable capability is disabled after installation and must be enabled explicitly.
Installation
After publishing the package to npm, add the bundle to the target profile:
dsh plugin --profile <profile-name> add dsh-continue
Installation only mounts the plugin; every policy remains disabled by default. Use /continue set ... inside a task to opt in without first editing the global profile. It can be installed alongside dsh-camel.
Quick start
Choose explicit recommendations for only the current task:
/continue set {"recommended":{"enabled":true}}
Enable network recovery and safe structured continuation as well:
/continue set {"network":{"enabled":true},"recommended":{"enabled":true},"continuation":{"enabled":true,"autoConfirmContinue":true}}
Enable automatic Plan Mode exit separately:
/continue set {"continuation":{"autoApprovePlan":true}}
Inspect the task override and effective policy:
/continue status
Disable every Continue capability for this task:
/continue off
Remove the task override and inherit global defaults again:
/continue reset
If global defaults are enabled, reset can enable behavior again. Use off when the task must stay disabled.
Global and per-task configuration
After installing the bundle, override its continue row in the profile's cordis.patch.yml:
- id: continue
config:
defaults:
network:
enabled: true
recommended:
enabled: true
continuation:
enabled: false
autoApprovePlan: false
autoConfirmContinue: false
Policy precedence is:
task session override > plugin defaults > built-in values
A launcher, preset, or another plugin can inject a one-task policy:
ctx.continue.setTaskConfig(agent, {
network: { enabled: true },
recommended: { enabled: true },
})
Overrides are persisted as continue/config session events and survive resume and fork. Input configuration is snapshotted, so later mutation of the caller's object cannot silently change the active policy.
Network recovery
The default codes are TIMEOUT, TRANSPORT, and SERVER; RATE_LIMIT belongs to dsh-camel.
network.modedefaults tounlimited, while the capability itself remains disabled.- Local backoff starts at two seconds, doubles, and is capped at 60 seconds.
- A valid
Retry-Afterwins whenrespectRetryAfter=trueand is not truncated by localmaxDelayMs, but it is technically capped at the Harness/Node single-event limit of2147483647ms. - Use
boundedwithmaxRetrieswhen automatic termination is required. - Built-in
dsh-llm-retryalways gets first refusal; this package takes over only after downstream declines. - Explicitly adding
RATE_LIMITto global codes logs an ownership-overlap warning fordsh-camel.
Waits append standard llm/retry and llm/retry-started events and produce a log message. User cancellation and plugin disposal stop the wait immediately. A task-policy revision interrupts the timer and re-checks takeover eligibility. An already persisted wait keeps its original deadline, preventing duplicate retry events; takeover stops when the new policy is disabled, no longer matches, or has exhausted its budget.
Automatic answers
Recommended options
With recommended.enabled=true and the default onMissingRecommendation: ask, the plugin answers only when every question has exactly one option ending in (Recommended) or (推荐); missing or ambiguous recommendations return to the normal UI.
Other onMissingRecommendation values are:
first: process each question independently, preserving its unique recommendation and choosing the first option only where no recommendation exists. Use it only for interchangeable low-risk choices.stop: return an explicit failure for unattended pipelines that require a recommendation.
Continuation confirmation
With both continuation.enabled and autoConfirmContinue, only a single-choice binary decision is handled. It must contain exactly one affirmative label and one negative label, with no extra business option. Label matching is case-insensitive, and the configured affirmative and negative sets must not overlap.
All of these fail closed to the UI:
- No currently open turn or malformed tool arguments.
- The calling agent is not the exact live root in
ctx.agents.roots()(including aDELEGATED_CALLERchild), or that boundary cannot be verified. - Multi-select questions, duplicate ids/labels, and open free-text questions.
- Risk text in
question,header,detail, option labels, or option descriptions. - Per-turn automatic-decision or repeated-question limits.
Plan Mode
With autoApprovePlan=true, automatic exit requires a current open turn, an available ctx.planMode, active plan mode, and a non-empty plan beginning with a # heading. The state transition must report queued or committed; every other outcome delegates to the official tool path.
Accepting a plan ends plan review only. Commands in that plan remain subject to Harness sandbox and approval policy.
Plain-text fallback
This fallback is disabled and requires both switches:
{
"continuation": {
"enabled": true,
"plainTextFallback": true
}
}
It reads only the final assistant text in the current turn, requires a plainTextPatterns match, and rejects every riskBlockPatterns match. The default cap is one steer per turn to prevent self-question loops.
Safety and missing-capability fallbacks
- The plugin never handles
approval/request, privilege escalation, credentials, payments, releases, production deployment, or irreversible-operation approval. - It does not invent missing business data and never auto-answers multi-select.
- Missing
commands,systemPrompt, orplanModeservices disable only that optional integration; a missingagentsservice safely delegates structured automatic answers to the official tool path. - An invalid dynamic prompt policy omits the section instead of breaking model requests.
- Default Chinese and English risk terms cover deletion/destruction/wiping, overwrite, external sending, procurement, privilege escalation, release/deployment, payment, credentials/secrets/passwords, production, and irreversible actions; a match returns control to the UI.
- If a retry event cannot be persisted, the plugin does not return an unrecorded retry; it preserves the original model failure for the normal Harness terminal path.
- Loader schema and strict runtime validation reject unknown fields, overlapping labels, multipliers below 1, non-safe-integer counts, local delays above the timer limit, and other invalid combinations.
dsh-camelcan load beside this package; each owns different failure codes and independent task state.
A practical rollout is to enable only network and recommended first, then opt into Plan Mode or plain-text fallback after the project's question patterns are stable.