Files
deepseek-harness/examples/coding-agent/code-mode.cordis.yml
T
Yichen Jiang c748f30055 fix(workspace-context): skip blocked touches and disable in Code Mode
Address the two remaining review warnings on PR #106.

- tools/post-execute: when a downstream listener/policy returns `block`,
  return early without loading or attaching workspace instructions. The
  registry turns a block into a final isError result, so reconciling off
  the original successful result leaked instructions from a rejected call
  and advanced nested/baseline tracking off a touch that never happened.
- Disable workspaceContext in the Code Mode examples: fs tools run as
  run_code sub-dispatches and code-mode.ts drops sub-call additionalContext,
  so dynamic AGENTS.md updates are silently discarded there.

Update the block regression test to assert no context is attached, and add
a waterfall case proving accept still surfaces the discovered instructions.
2026-07-13 03:40:10 +00:00

42 lines
2.1 KiB
YAML

# Code Mode overlay: the live coding-agent tree (./cordis.yml) with two
# load-time patches — the app entry's config gains `tools: { mode: code }`
# (the registry offers exactly one wire tool, run_code, plus the generated
# TypeScript SDK prompt section declaring bash/read/write/edit/subagent/
# todo_write) and the worker-thread code runtime joins the tree as
# `ctx.codeRuntime`. The dsh-stdio-agent bin boots this file for
# `pnpm run demo:code-mode` (the acp-agent example carries the same-shaped
# overlay for the `acp` UI). A config patch REPLACES the entry's whole
# config, so the base entry's fields are restated verbatim; only `tools`,
# the welcome, and the persona's second paragraph are Code Mode deltas.
- id: base
name: '@cordisjs/plugin-include'
config:
path: ./cordis.yml
patches:
- id: stdio-agent
name: '@deepseek-ai/dsh-stdio-agent'
config:
model: deepseek-v4-flash
resumeSessionId: !!js process.env.RESUME_SESSION_ID
persistenceRoot: './.sessions'
# Disabled in Code Mode: fs tools run as run_code sub-dispatches and
# code-mode.ts deliberately drops sub-call `additionalContext`, so the
# nested/changed/removed AGENTS.md notices this feature emits after
# read/write/edit are discarded before the loop can append them.
# Enabling it would only ship the baseline prefix while silently
# dropping the dynamic updates, so keep it off until sub-dispatch
# context propagation lands.
workspaceContext: false
tools:
mode: code
welcome: 'code-mode agent ready. Give it a multi-tool task.'
persona: |
You are coding-agent, a coding assistant powered by the {{model}} model.
You work by writing TypeScript programs for run_code: batch related
tool work into one program, loop and branch where it helps, and print
or return ONLY the findings that matter.
- insert:
- id: code-runtime
name: '@deepseek-ai/dsh-code-runtime-worker'