Skip to content

Conversation

@ashwin-ant
Copy link
Collaborator

Replace separate system_prompt and append_system_prompt fields with a single system_prompt field that accepts:

  • string: custom system prompt
  • {"preset": "claude_code"}: use default Claude Code prompt
  • {"preset": "claude_code", "append": "..."}: default prompt with additions
  • None/undefined: vanilla Claude with no system prompt

This matches the TypeScript SDK API design and provides more flexible system prompt configuration.

🤖 Generated with Claude Code

@ashwin-ant ashwin-ant requested a review from a team September 26, 2025 05:56
dicksontsai
dicksontsai previously approved these changes Sep 26, 2025
options = ClaudeCodeOptions(
system_prompt={"preset": "claude_code", "append": "Be concise."},
)
assert options.system_prompt == {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this test actually testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as what test_claude_code_options_with_system_prompt was testing before, I think? Not a whole lot 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to clean this up, but feel free to merge

Base automatically changed from ashwin/agentssettingsource to main September 26, 2025 19:52
@ashwin-ant ashwin-ant dismissed dicksontsai’s stale review September 26, 2025 19:52

The base branch was changed.

ashwin-ant and others added 2 commits September 26, 2025 12:53
Replace separate system_prompt and append_system_prompt fields with a single
system_prompt field that accepts:
- string: custom system prompt
- {"preset": "claude_code"}: use default Claude Code prompt
- {"preset": "claude_code", "append": "..."}: default prompt with additions
- None/undefined: vanilla Claude with no system prompt

This matches the TypeScript SDK API design and provides more flexible
system prompt configuration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Update SystemPromptPreset to include required type: "preset" field
alongside preset: "claude_code", matching the TypeScript SDK structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
options = ClaudeCodeOptions(
system_prompt={"preset": "claude_code", "append": "Be concise."},
)
assert options.system_prompt == {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to clean this up, but feel free to merge

@ashwin-ant ashwin-ant merged commit dbb153b into main Sep 26, 2025
15 checks passed
@ashwin-ant ashwin-ant deleted the ashwin/systemprompt branch September 26, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants