DeepSHPlugins
dsh-auto-continue-429 项目预览
GITHUB / COMMUNITY PROJECT

dsh-auto-continue-429

Agents & AutomationJavaScriptMIT

Automatically sends "continue" to recover from RATE_LIMIT (429) and QUOTA (insufficient_quota) errors. Per-session consecutive-failure counter (default 20, configurable 1-100), a toolbar on/off switch, and a settings-page card.

3 Starshaochi72 Updated 2026-08-19
Open GitHub repository
dsh-auto-continue-429 项目预览

About this project

Chinese

Automatically sends "continue" to recover from RATE_LIMIT (429) and QUOTA (insufficient_quota) errors. Per-session consecutive-failure counter (default 20, configurable 1-100), a toolbar on/off switch, and a settings-page card.

English

Automatically sends "continue" to recover from RATE_LIMIT (429) and QUOTA (insufficient_quota) errors. Per-session consecutive-failure counter (default 20, configurable 1-100), a toolbar on/off switch, and a settings-page card.

Project details & listing signals

Snapshot 2026-09-11
Creator / organization
haochi72
Repository
haochi72/dsh-auto-continue-429
GitHub Stars
3
Forks
1
Programming language
JavaScript
License
MIT
Last push
2026-08-19
Manifest
Declaration found in the catalog

A public repository does not automatically permit commercial use. Check the project's license and compatibility. Manifests and catalog scores are not security certifications.

Catalog score

54/ 100
Maintenance activity
85
Documentation & practical information
50
Community interest
25
Installation signals
80
Project declarations
100

近 23 天仍在更新;关注度尚低(3)。

Scores use five dimensions of the catalog snapshot. They are browsing aids, not hands-on reviews or security assessments.

Install & use

The respective GitHub repositories define project information and licensing.

dsh plugin --profile web add dsh-auto-continue-429

Copying a command does not execute it. Read the repository documentation and check requirements and licensing first.

Project screenshots

Repository README

GitHub 原文

Saved repository documentation. Its capture date was not recorded and it may differ from the catalog description. Check the current repository before installing.

Repository documentation is preserved in its original language.

dsh-auto-continue-429

DeepSeek Harness(DSH)插件:遇到 429 限流 / 配额耗尽自动 continue 恢复对话,20 次连续失败才停,成功一次即清零。

✨ 功能特色

能力说明
🔄 自动 Continuedsh-llm-retry 的 step 级重试耗尽后,自动发送 continue 开启新 turn
🚦 识别 429 与配额耗尽监听 RATE_LIMIT(429)与 QUOTA(insufficient_quota 等)两类错误码
🎛 对话框底部开关输入区底部「开/关」滑动开关,点击即切换,无需去设置页
⚙ 设置页主开关「启用插件」主开关:停用后插件整体失效,对话框不再显示开关按钮(两开关互不联动)
🧮 连续失败计数每会话独立计数:连续失败 20 次只停止该会话,任何一次 turn 正常结束即清零,互不影响
✋ 手动干预即清零你主动发送任意消息后,所有会话积攒的失败计数全部归零(自动 continue 不算干预)
⏱️ 随机 1~2 秒退避每次 429 后随机等待 1~2 秒发送 continue(不随重试次数增长)
🤫 无计数显示开关条不显示当前失败次数;达到上限该会话自动停止,再发一条消息即清零
💾 设置持久化开关状态/隐藏状态保存在 ~/.dsh/auto-continue-429.json

UI 交互示例:

┌─────────────────────────────────────────┐
│                                         │
│   对话内容                               │
│                                         │
│  [🟢429] [开]      ← 对话框底部开关条    │
│  (设置页停用插件后,此开关条自动隐藏)     │
└─────────────────────────────────────────┘

📦 安装

方式 1:已发布到 npm(发布后)

cd ~/.dsh/profiles/web
pnpm add dsh-auto-continue-429

方式 2:从 GitHub 安装

dsh plugin --profile web add github:haochi72/dsh-auto-continue-429

方式 3:本地开发链接

cd ~/.dsh/profiles/web
pnpm link /path/to/dsh-auto-continue-429

然后在 ~/.dsh/profiles/web/package.json 的 dsh.profile.bundles 数组末尾加上:

"dsh-auto-continue-429"

重启 DSH Desktop 生效。


🚀 使用

1. 确认加载成功

重启 DSH 后在对话框输入区底部,应该出现一个胶囊形的 「429」开关条(绿色=已开启)。

2. 控制开关

操作效果
点击对话框底部的开关条切换快捷开关(quickOn),绿色=开,灰色=关
设置页 → 429 自动 Continue 卡片 →「启用插件」切换主开关(enabled),与对话框快捷开关互不联动
在设置页停用插件对话框底部的开关条自动隐藏;重新启用后恢复显示
设置页 →「连续失败上限」自定义失败多少轮后停止自动 continue(1-100)

3. 遇到 429 / 配额耗尽时的行为

LLM 返回 429 或配额耗尽(insufficient_quota)
  ↓
dsh-llm-retry 在当前 step 内重试 2 次(内置)
  ↓
重试耗尽 → turn 以 error(RATE_LIMIT / QUOTA) 结束
  ↓
★ 本插件介入
  ↓
等 1~2 秒(随机)→ 发送 "continue" → 新 turn 启动 ✅
  ↓
(如果又 429)
  ↓
等 1~2 秒(随机)→ 发送 "continue" → …(重复到第 20 次)
  ↓
如果某次 turn 正常结束(reason.kind ≠ error)→ 计数归零 🎉
  ↓
连续 20 次全失败 → 停止,等待手动介入

⚙️ 配置(可选)

插件提供以下 Schema 配置项(在 cordis.patch.yml 或 profile 配置中声明):

- id: auto-continue-429
  name: dsh-auto-continue-429
  config:
    maxRetries: 20          # 连续失败最大次数(默认20)
    continueMessage: "continue"  # 发送的 continue 消息文本

🧩 架构

本插件是 DSH 标准的双端插件(Cordis 驱动):

dsh-auto-continue-429/
├── package.json          # dsh.bundle.patch 声明 + dsh.client 声明
├── cordis.patch.yml      # bundle 层补丁:插入插件行
├── lib/
│   ├── index.js          # 宿主端:错误拦截 + 退避 + continue + HTTP 路由
│   └── client.js         # 客户端:对话框底部开关条 + 设置页卡片
├── LICENSE               # MIT
└── README.md

宿主端接入点

接入点说明
ctx.inject(["webServer"])注册 5 个 HTTP 路由供客户端轮询与控制
ctx.on("session/event", …)监听 turn/end,检测 RATE_LIMIT / QUOTA 错误码后调度 continue(全局监听,覆盖所有会话)
ctx.agents.get(sessionId).followup(…)发送 continue 用户消息

客户端接入点

纯 DOM 注入(不依赖 React),通过 HTTP fetch 与宿主端通信:

  • 启动时在对话框输入区底部创建「开/关」开关条
  • 每 2 秒 GET /api/auto-continue-429/state 同步状态
  • POST /toggle-quick 切换对话框快捷开关、POST /toggle 切换设置页主开关、POST /set-max-retries 保存失败上限
  • MutationObserver 监听设置页 DOM 自动注入设置卡片;输入区被 SPA 重渲染时自动重新挂载开关条

🔒 权限

  • 不访问文件系统:仅 ~/.dsh/auto-continue-429.json 保存开关状态(<1KB)
  • 不读取 API Key:完全复用 DSH 内置的 agent/followup 通道
  • 不外发任何网络请求:所有 HTTP 路由走 DSH 内置 webServer(localhost 回环)

🐛 调试

宿主端日志(DSH stdout):

[auto-continue-429] 会话 sess_xxx 连续失败第 3/20 次,2000ms 后自动 continue
[auto-continue-429] 已发送 continue 到会话 sess_xxx
[auto-continue-429] 已达连续失败上限 20 次,停止自动 continue

设置文件路径:

~/.dsh/auto-continue-429.json
→ {"enabled": true, "quickOn": true, "buttonHidden": false, "maxRetries": 20}

📜 开源协议

MIT © 2026

Before you begin

Check the current repository for installation, compatible versions and licensing. Stars and catalog scores are snapshot-based browsing signals.

Installation & troubleshooting · 项目问题反馈

Related projects