← Back to AI Insights
Gemini Executive Synthesis

`dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable.

Technical Positioning
Adapting `dsh-purge` to breaking changes in the DeepSeek Harness platform to maintain functionality and prevent runtime errors caused by deprecated prompt variables.
SaaS Insight & Market Implications
This issue highlights a critical compatibility failure due to upstream platform breaking changes. DeepSeek Harness (DSH) deprecated the `{{cwd}}` prompt variable, but `dsh-purge` 1.1.71 forcibly injects it, causing runtime errors. This forces developers to modify plugin code directly, indicating a severe maintenance burden and poor forward compatibility. The pain point is the inability to use `dsh-purge` with newer DSH versions, rendering the plugin unusable without manual intervention. This scenario underscores the risks of tight coupling to evolving platform APIs and the necessity for robust versioning and migration strategies. For SaaS, such breaking changes without clear plugin adaptation paths lead to user frustration and abandonment, impacting ecosystem health and developer trust.
Proprietary Technical Taxonomy
dsh-purge:1.1.71 DSH web 应用 agent-loop 系统提示词插件 @deepseek-ai/dsh-system-prompt profile:web unknown prompt variable "{{cwd}}" deployment:persona-suffix

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Oct 22, 2026
Repo: mmparko/dsh-purge
反馈:dsh-purge 1.1.71 在新版 DSH 下组装提示词必然失败(运行时注入 `{{cwd}}` 未注册变量)

## 环境

- dsh-purge:1.1.71(安装在 `~/.dsh/profiles/web/node_modules/dsh-purge/`)
- DSH web 应用:新版 agent-loop(`packages/core/agent-loop`),系统提示词插件为 `@deepseek-ai/dsh-system-prompt`
- profile:web

## 报错

每次会话启动即失败,模型请求发出前抛出:

```
本轮运行失败 unknown prompt variable "{{cwd}}" in section "deployment:persona-suffix"; registered variables: provider, model
```

## 根因

新版 DSH 的 agent-loop 只注册了 `provider` / `model` 两个提示词变量,不再内置 `{{cwd}}`(见官方升级指南 `docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md`:工作目录改由 working-directory 服务作为必需 user context 提供,自定义模板保留 `{{cwd}}` 会在组装时抛错)。

但 dsh-purge 的运行时身份改写仍假设 `{{cwd}}` 可用。`lib/identity.js` 中的 `overlayOfficialIdentity()`:

1. 发现 `deployment:persona-suffix` 段为空 / 是官方身份 / 是纯 cwd 句时,强制替换为 `CWD_ONLY_SUFFIX = "Your working directory is {{cwd}}."`(第 8、232-238 行);
2. 组装结果里没有 suffix 段时,还会主动新建一个塞入 `CWD_ONLY_SUFFIX`(第 244-249 行)。

因此即使用户把配置里的 `personaSuffix` 清空,插件也会在运行时把 `{{cwd}}` 写回,渲染必炸。改配置无法规避,只能改插件代码。

## 本次本地修复(3 处,均在 `lib/identity.js`)

1. `CWD_ONLY_SUFFIX` 改为不含变量的静态句:
```js
export const CWD_ONLY_SUFFIX = "Your working directory is provided in the runtime context.";
```
2. `stripHarnessPersona()` 中两条把 `…Your working directory is {{cwd}}.` 改写为 `Working directory: {{cwd}}. ` 的规则(第 154-157、162-165 行),改为直接删除该句——否则旧文本会被转换成又一种 cwd 模板:
```js
.replace(
/You are a coding agent powered by the \{\{model\}\} model, running on the DeepSeek Harness\. Your working directory is \{\{cwd\}\}\.?\s*/g,
"",
)
.replace(
/You are a coding ...

Developer Debate & Comments

No active discussions extracted for this entry yet.

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from mmparko/dsh-purge.

Extracted Positioning
Community-maintained fork of `dsh-purge` (Purge Community).
Providing ongoing maintenance, compatibility fixes, and enhanced features for `dsh-purge` users, addressing the original repository's stagnation and upstream DeepSeek Harness (DSH) compatibility challenges.
Extracted Positioning
`dsh-purge` plugin functionality failure.
User reports complete failure of `dsh-purge` to function as expected, indicating a critical bug or incompatibility.

Frequently Asked Questions

Market intelligence mapped to `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable..

What problem does `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable. solve?
Based on our AI analysis of the original developer request, its primary technical positioning is: Adapting `dsh-purge` to breaking changes in the DeepSeek Harness platform to maintain functionality and prevent runtime errors caused by deprecated prompt variables.
What is the general sentiment around `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable.?
Yes, we have tracked 1 direct responses and active debates regarding this specific topic originating from GitHub Issue.
What architecture is tied to `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable.?
Our proprietary extraction maps `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable. to adjacent architectural concepts including dsh-purge:1.1.71, DSH web 应用, agent-loop, 系统提示词插件.
What open-source repositories focus on `dsh-purge` plugin compatibility with new DeepSeek Harness (DSH) `agent-loop` regarding `{{cwd}}` prompt variable.?
Yes, open-source adoption is correlated. An active project titled 'zhu1090093659/dsh-web-ui' explores similar frameworks: DeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发

Engagement Signals

1
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like agent-loop and dsh-purge:1.1.71 by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.