Skip to content

v2.4.0

Latest

Choose a tag to compare

@Zongwei9888 Zongwei9888 released this 16 Nov 08:37
· 19 commits to main since this release

DeepCode v2.4.0 makes Goals checkable before they count as complete, keeps a Session's history through crashes and restarts, tightens the sandbox, and lets the background service manage its own port and upgrades. Desktop and Web are fully in Chinese and easier to read on long tasks, and the TUI shows clearer approvals. The release also includes the community fixes merged since v2.3.1 and dependency security updates.

Highlights

  • Goals checked before they count as complete. Early in a Goal the agent proposes a checklist: each requirement paired with a command that proves it. Once you confirm it, DeepCode runs those commands itself every time the agent says the Goal is done, and sends back any that fail. Settings → General → Goal completion adds a rule check (#281) or an independent reviewer that re-checks every requirement against the workspace. The Goal card keeps every verdict with its evidence. A Goal can have a time limit, stops when it is stuck or repeating itself, and wraps up when its budget runs out. See Goals and headless runs.
  • Sessions that keep their history. A Session that cannot be read is listed with the reason instead of being dropped. A stopped or failed Turn keeps what it already wrote. Every message is saved as the model reads it, so a crash mid-Turn no longer loses the Turn.
  • A tighter sandbox. Agent commands no longer see the model keys DeepCode uses. Credential files and the private keys in ~/.ssh cannot be read, while git over SSH still works through your SSH agent. A repository's own config can no longer turn the sandbox off or choose Full access. Project hooks run only after you approve them (#282). File tools ask before writing hook files (#271). "Always allow" covers one kind of call, so allowing ls does not allow rm. file: URLs are checked against protected paths (#292). An opt-in risk evaluator is available with DEEPCODE_RISK_EVALUATOR=1 (#257).
  • A background service that manages itself. If port 3081 is taken, the service picks a free one. After an upgrade, the new client replaces an idle older service by itself. Answers stream straight to every client, and a reconnect picks up the text being written. On Windows the service no longer opens a console window for each program it starts (#267). The Web sign-in no longer uses a cookie.
  • Desktop and Web: your language, long tasks that read well. Every screen follows the interface language, including tool steps, approvals, Goal status, MCP, skills, presets and errors. A run of tool steps folds into one line that says what was done, and a 40-Turn Session opens about seven times faster. The Web client can browse folders when you open a project. Windows narrower than 720 px get a drawer sidebar. A separate font can be set for code (#265).
  • A clearer terminal UI. While a call waits for you, the TUI lists the keys and shows the diff or the full command. Text you type meanwhile stays in the composer. Chinese wraps by character, and resuming a running Turn shows its progress once. With no API key, the TUI says so at startup and shows the command to add one.
  • Lighter compaction and leaner presets. agents.defaults.microcompact clears stale tool output before asking the model for a summary (#279). Anthropic prompt caching covers the latest message (#280). Agent presets can remove tools with disallowed-tools (#283).
  • Community fixes. GPT-5 and the o-series work with the default settings (#286); MCP settings and credentials are written together (#259); optional MCP tool arguments accept null (#261); deepcode mcp list flags unpinned npx/uvx packages (#275); monitor exit codes, stable Responses tool-call ids, and the project's own Python for verification (#270); Responses requests keep an image's detail (#296); memory consolidation keeps every topic link (#287); and three Paper2Code fixes (#288, #290, #299).
  • Security updates. The Python packages bundled with Desktop move to patched releases, including pypdf 6.21.4 (#278).

The full list, day by day, is in CHANGELOG.md.

Upgrading

Run pip install -U deepcode-hku. The next client you open replaces an idle older background service with the new version. A service that still has work running is left alone and the client says so; run deepcode service restart once that work finishes. If you installed the service as a login item, run deepcode service install --at-login again. Your Sessions, settings and credentials carry over.

Four changes may need a step from you:

  • Project hooks need approval. Hooks declared in a repository run only after you approve them. Trusting a project approves its current hooks; after they change, run deepcode hooks approve in the project. deepcode hooks status shows where you stand.
  • Commands no longer see DeepCode's model keys. If a workflow relied on them, set DEEPCODE_BASH_FULL_ENV=1.
  • Sandbox and Full access are your settings, not the repository's. A project config that turned the sandbox off or chose Full access is ignored; set it in your own settings.
  • A Goal in progress pauses when DeepCode restarts. Continue it when you are ready. Goals run by an Automation keep going.

To keep a copy of your data first, run deepcode service prepare-upgrade --output PATH before installing; see Upgrade and restore.

Thanks

This release includes contributions from @raymondginger2018-sudo, @rifkir23, @vishalhabib99, @dajiaohuang, @remote-controlled-man, @Elon-Jiang, @xyi74976-del and @bingdongni. Thank you.

Full changelog: v2.3.1...v2.4.0


DeepCode v2.4.0 的主要变化:Goal 要先验收才算完成;会话历史在崩溃和重启后也不会丢;沙箱更严;后台服务自己处理端口冲突和版本升级。Desktop 与 Web 全部有了中文,长任务更好读;TUI 的审批也更清楚。本版本还包含 v2.3.1 以来合并的社区修复和依赖安全更新。

亮点

  • Goal 先验收,再算完成。 Goal 开始不久,智能体会提出检查清单,每项需求配上能证明它的命令。你确认之后,智能体每次说完成,DeepCode 都会自己运行这些命令,没通过的会打回。在设置 → 通用 → 目标完成验收里,还可以选规则检查(#281)或独立审查;独立审查由另一个智能体对照工作区逐条核对。每次验收的结论和证据都留在 Goal 卡片上。Goal 可以设时间上限;卡住或原地打转时会自己停下;预算用完时先收尾。参见 Goal 与无界面运行(英文)。
  • 会话保住历史。 读不出来的会话会连同原因一起列出,不再被丢掉。被停止或出错的回合会保留已经写出的内容。每条消息在模型读到时就会保存,回合中途崩溃也不会丢掉这个回合。
  • 沙箱更严。 智能体运行的命令看不到 DeepCode 使用的模型密钥。凭据文件和 ~/.ssh 里的私钥无法读取,通过 SSH 的 git 仍借助你的 SSH agent 照常工作。仓库自己的配置不能再关闭沙箱或选择 Full access。项目 hook 要经你批准才会运行(#282)。文件工具写 hook 文件前会先询问(#271)。"始终允许"只覆盖同一类操作,允许了 ls,rm 仍然要问。file: 链接也按受保护路径检查(#292)。另有可选的风险检查,设置 DEEPCODE_RISK_EVALUATOR=1 即可打开(#257)。
  • 后台服务自我管理。 3081 端口被占用时,服务会自动换一个空闲端口。升级之后,新版客户端会自动替换空闲的旧版服务。回答直接推送给各个客户端,重连后能接上正在写的内容。Windows 上服务启动程序时不再弹出终端窗口(#267)。Web 登录不再使用 cookie。
  • Desktop 与 Web:界面全用你的语言,长任务更好读。 所有界面都跟随所选语言,包括工具步骤、审批、Goal 状态、MCP、技能、预设和错误提示。连续的工具步骤收成一行,写明做了什么;40 个回合的会话打开快了约七倍。Web 端打开项目时可以浏览文件夹。窗口窄于 720 px 时侧栏变成抽屉。代码可以单独设置字体(#265)。
  • 终端界面更清楚。 等你批准时,TUI 会列出按键,并显示 diff 或完整命令;等待期间输入的文字会留在输入框里。中文按字换行。恢复运行中的回合时,已有进度只显示一次。没有 API key 时,启动就会提示,并给出添加命令。
  • 更轻的压缩,更精简的预设。 打开 agents.defaults.microcompact 后,会先清掉过时的工具输出,再考虑让模型做总结(#279)。Anthropic 提示缓存覆盖到最新一条消息(#280)。智能体预设可以用 disallowed-tools 去掉工具(#283)。
  • 社区修复。 GPT-5 与 o 系列模型在默认设置下可用(#286);MCP 设置和凭据一起写入,不会只成功一半(#259);MCP 工具的可选参数可以传 null(#261);deepcode mcp list 会标出没有固定版本的 npx/uvx 包(#275);monitor 用退出码报告失败,Responses 的工具调用 id 保持不变,验证时用项目自己的 Python(#270);Responses 请求保留图片的 detail(#296);整理记忆时不再丢主题链接(#287);另有三项 Paper2Code 修复(#288、#290、#299)。
  • 安全更新。 Desktop 附带的 Python 依赖升级到已修补的版本,包括 pypdf 6.21.4(#278)。

按天记录的完整更新见 CHANGELOG_ZH.md。

升级

运行 pip install -U deepcode-hku。下次打开任一客户端时,空闲的旧版后台服务会自动换成新版本。如果服务里还有任务在运行,客户端不会动它,只会提示;等任务结束后运行 deepcode service restart 即可。如果把服务装成了登录项,请再运行一次 deepcode service install --at-login。会话、设置和凭据都会保留。

有四处变化可能需要你操作:

  • 项目 hook 需要批准。 仓库里声明的 hook 要经你批准才会运行。信任项目时会批准当前的 hook;hook 有改动后,在项目里运行 deepcode hooks approve。运行 deepcode hooks status 可以查看批准状态。
  • 命令看不到 DeepCode 的模型密钥。 如果你的流程依赖这些密钥,设置 DEEPCODE_BASH_FULL_ENV=1。
  • 沙箱和 Full access 由你决定,不由仓库决定。 项目配置里关闭沙箱或选择 Full access 的设置会被忽略,请在你自己的设置里修改。
  • 重启后进行中的 Goal 会暂停。 准备好了再继续。由 Automation 运行的 Goal 不受影响。

想先备份数据,可以在安装前运行 deepcode service prepare-upgrade --output 路径,参见升级与恢复(英文)。

致谢

本版本包含来自 @raymondginger2018-sudo、@rifkir23、@vishalhabib99、@dajiaohuang、@remote-controlled-man、@Elon-Jiang、@xyi74976-del 和 @bingdongni 的贡献。谢谢你们。