Copilot SDK v0.1.33-preview.4: System Prompt Customization
Copilot SDK adds fine-grained system prompt customization with a new 'customize' mode, transform callbacks, and fixes across all 4 SDKs.
TL;DR
- New 'customize' mode for fine-grained system prompt control — override individual sections without replacing the whole prompt
- 9 configurable sections with 4 override actions (replace, remove, append, prepend) per section
- Transform callbacks now supported across all 4 SDKs (TypeScript, Python, Go, .NET) for read-then-write mutations
- Multiple bug fixes: JSON serialization in Go, Python keyword args, type checking
New
- Customize mode for systemMessage — Selectively override individual prompt sections (identity, tone, tool_efficiency, environment_context, code_change_rules, guidelines, safety, tool_instructions, custom_instructions, last_instructions) while preserving the rest. Sits between 'append' and 'replace' modes.
- Transform operation — Read-then-write mutation of system prompt sections via callbacks. SDK intercepts function-valued actions, stores callbacks locally, and handles batched systemMessage.transform RPC calls from the runtime.
- lastInstructions section — Now exposed as a customizable section across all 4 SDKs.
Fixed
- Go JSON serialization — Added json tags for Content field in systemMessageTransformRequest/Response structs; was serializing as uppercase 'Content' instead of lowercase 'content', causing transform results to be silently ignored.
- Python keyword args — Updated create_session() calls in E2E tests to use keyword arguments after method refactor.
- Python type checking — Fixed invalid-assignment error in session transform handler by ensuring transform callback result is typed as str.
- Documentation — Fixed incorrect package name in Node.js README (@anthropic-ai/sdk → @github/copilot-sdk), added standalone 'System Message Customization' sections with code examples to Python and Go READMEs, fixed 'end of the prompt' wording to 'additional instructions'.
- E2E test coverage — Added transform result assertions via HTTP traffic inspection across all 4 SDKs to verify transformed content actually reaches the model.
Breaking Changes
- create_session() in Python SDK now requires keyword arguments instead of positional dict.
Update via go get github.com/github/copilot-sdk/go@v0.1.33-preview.4 (or equivalent for your SDK language).
Source: Copilot SDK