Fix Claude provider dropping the CoC system message#309
Merged
plusplusoneplusplus merged 1 commit intoJun 10, 2026
Merged
Conversation
ClaudeSDKService passed customSystemPrompt/appendSystemPrompt to
query(), but @anthropic-ai/claude-agent-sdk >= 0.1 only reads the
unified systemPrompt option and silently discards the legacy keys,
so every CoC-authored system message (ask-mode read-only
instructions, repo instructions, memory guidance) never reached
Claude and sessions ran with an explicitly empty system prompt.
Map mode 'append' to systemPrompt { type: 'preset', preset:
'claude_code', append } (Claude Code default prompt plus CoC
instructions) and mode 'replace' to a custom string systemPrompt;
blank or absent content still omits the field. Verified at the wire
level that the initialize control request now carries the appended
content, while the old shape produced systemPrompt [""] with the
instructions dropped.
Tests cover append/replace mapping, blank/absent omission, resumed
sessions, and regression assertions that the ignored legacy options
are never sent.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClaudeSDKService passed customSystemPrompt/appendSystemPrompt to
query(), but @anthropic-ai/claude-agent-sdk >= 0.1 only reads the
unified systemPrompt option and silently discards the legacy keys,
so every CoC-authored system message (ask-mode read-only
instructions, repo instructions, memory guidance) never reached
Claude and sessions ran with an explicitly empty system prompt.
Map mode 'append' to systemPrompt { type: 'preset', preset:
'claude_code', append } (Claude Code default prompt plus CoC
instructions) and mode 'replace' to a custom string systemPrompt;
blank or absent content still omits the field. Verified at the wire
level that the initialize control request now carries the appended
content, while the old shape produced systemPrompt [""] with the
instructions dropped.
Tests cover append/replace mapping, blank/absent omission, resumed
sessions, and regression assertions that the ignored legacy options
are never sent.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com