Repository navigation
Description
Part of #261. A review of everything the model reads besides the conversation (system prompt, tool descriptions, context loaded at session start, text injected mid-session) compared DreamCoder with Codex CLI and ZCode and found 79 issues: system prompt, tools, context loading, mid-session text. Each finding has the current behavior with code locations, a concrete scenario, how the other two handle it, and a fix direction.
This issue covers the correctness part. Items that are self-contained and fully specified are split into sub-issues for contributors (listed at the end); the rest are done here. Shrinking the fixed part of each request and adding missing guidance wait for the benchmark task set and get their own issues later.
Decided
- The identity line at the top of the system prompt stays as it is, for every model.
- Instruction files: see Harness: load AGENTS.md and DREAMCODER.md as project instructions #271.
- Memory writes: the CLI's permission carve-out also covers the memory directory the server sets.
- Restarts: the transcript keeps all attachments; Stop ends the CLI only when the interrupt did not end the turn.
- Commit and PR attribution: "Generated with DreamCoder" for every model, no
Co-Authored-Byline; a desktop setting turns it on or off (see Harness: attribute commits and PRs to DreamCoder, with a setting to turn it off #280). - The malware notice after file reads is removed for every model (see Harness: small fixes in mid-session reminder text #279).
- Text that Claude Code ships only to Anthropic's internal builds (
USER_TYPE === 'ant') is not enabled; it is deleted.
Context and memory
- Saving a memory asks the user every time (T-CTX-02, T-SYS-05). The server sets
CLAUDE_COWORK_MEMORY_PATH_OVERRIDE; the permission carve-out for memory files applies only without an override (src/utils/permissions/filesystem.ts:1739), so every write needs approval, even in bypass mode, while the memory instructions say to write directly. Extend the carve-out to the override path. - The skill list goes out of step with what the model knows (T-CTX-03, T-INJ-10). After compaction it is not sent again; any change in the skill directories resends the whole list; after a restart it is sent again in full. One record of sent skills drives all three.
- The first user message contradicts itself (T-CTX-04). "May or may not be relevant" outside, "must follow exactly" inside, and
MEMORY.mdunder the "must follow" preface. - Subagents get the memory index without the memory instructions (T-CTX-16).
CLI restarts
The desktop app restarts the CLI three seconds after Stop and whenever effort, model, provider or bypass mode changes.
- Injected context is lost on restart (T-INJ-02). For non-ant users the transcript keeps only queued-message attachments (
src/utils/sessionStorage.ts:4406-4423), so uploaded images and files, subdirectory instruction files and files restored after compaction disappear, and the prefix cache misses from the first dropped attachment. Write all attachments to the transcript. - Session-start context is computed per process (T-CTX-06). Git status, instruction files and date are recomputed after each restart; hook output and nested instruction files are appended again.
- Stop always ends the CLI process (
src/server/ws/handler.ts:875-881), without checking whether the interrupt already ended the turn. End it only when the turn did not stop. - Resuming inserts "Continue from where you left off." and a fake assistant reply, but does not continue (T-INJ-17).
Text for the model in use
- Delete the internal-build-only text (T-SYS-03, T-TOOL-21). The
USER_TYPE === 'ant'branches in the system prompt and tool descriptions never reach DreamCoder users; remove them instead of keeping dead text. - Reminders and messages that arrive after a tool result are appended to its text (T-INJ-12). A Claude-specific measure (
src/utils/messages.ts:2698-2724) applied to every model; for other models keep them as separate blocks, which the proxy already sends as a separate user message. Check that the main providers accept a user message right after tool messages. Shorten the repeated authority notice in cross-session and kanban messages. - The environment section lists Claude models, Claude Code's products and
/fast(T-SYS-04, T-CTX-05), and says nothing about the desktop app. - Read says the model can see images and read PDFs (T-TOOL-04), and calls itself "a multimodal LLM". Through the proxy, images in tool results and PDFs do not reach the model today; describe what actually reaches it.
-
/helppoints to Claude Code (T-SYS-10); the text about how output is shown does not match the desktop app (T-SYS-11); theupdate-configskill entry names Claude Code and a Config tool that is not sent (T-CTX-09); the statusline-setup subagent configures a status line the desktop app does not have (T-SYS-12).
Behavior the text gets wrong
- Plan mode has three different procedures (T-TOOL-09); one says not to write any file, another asks for a plan file.
- EnterWorktree and ExitWorktree describe hooks, tmux and an exit prompt the desktop app does not have (T-TOOL-13). Keep the tools; describe the desktop behavior and check that the desktop panels follow the CLI into the worktree.
- AskUserQuestion exposes internal fields and a
previewthe desktop app does not render (T-TOOL-11). - The file-changed notice blames "the user or a linter", says not to tell the user, and carries up to 8K per file (T-INJ-06).
-
/goalcontinuation gives the model one sentence from the evaluator (T-INJ-07), without the goal text, budget or a continuation limit. - The compaction summary points to a JSONL transcript that is usually over Read's 256 KB limit (T-INJ-13).
Sub-issues for contributors
- Harness: load AGENTS.md and DREAMCODER.md as project instructions #271 Load
AGENTS.mdandDREAMCODER.mdas project instructions - Harness: SendMessage should accept subagent names and ids when agent teams are off #272 SendMessage: accept subagent names and ids when agent teams are off
- Harness: fix inaccurate tool descriptions and schemas #273 Fix inaccurate tool descriptions and schemas
- Harness: count assistant responses, not content blocks, for the task reminder #274 Task reminder: count assistant responses, not content blocks
- Harness: keep the line range when quoting a workspace selection #275 Keep the line range when quoting a workspace selection
- Harness: tell the model to stop when the user denies a permission in the desktop app #276 Tell the model to stop when the user denies a permission in the desktop app
- Harness: session title prompt should not answer the message and should use the user's language #277 Session title prompt: do not answer, use the user's language
- Harness: small fixes in context and system prompt text #278 Small fixes in context and system prompt text
- Harness: small fixes in mid-session reminder text #279 Small fixes in mid-session reminder text
- Harness: attribute commits and PRs to DreamCoder, with a setting to turn it off #280 "Generated with DreamCoder" attribution, with a setting to turn it off
Activity
fix(harness): correct the text layer for DreamCoder and non-Claude mo…
fix(harness): correct the text layer for DreamCoder and non-Claude mo…