Add SystemPromptFile support for --system-prompt-file CLI flag#591
Open
ronmrdechai wants to merge 1 commit intoanthropics:mainfrom
Open
Add SystemPromptFile support for --system-prompt-file CLI flag#591ronmrdechai wants to merge 1 commit intoanthropics:mainfrom
ronmrdechai wants to merge 1 commit intoanthropics:mainfrom
Conversation
Allow users to specify a file path for the system prompt via a new SystemPromptFile TypedDict, which passes --system-prompt-file to the CLI.
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.
I'm trying to pass a really big system prompt to Claude and it fails on an ARGMAX error. This change exposes --system-prompt-file to the SDK.
Summary
SystemPromptFileTypedDict withtype: "file"andpathfields totypes.pySystemPromptFileto thesystem_promptunion type onClaudeAgentOptionssubprocess_cli.pyby passing--system-prompt-file <path>to the CLItest_types.pyandtest_transport.pyTest plan
test_claude_code_options_with_system_prompt_file— verifiesClaudeAgentOptionsaccepts and stores aSystemPromptFiledicttest_build_command_with_system_prompt_file— verifies the command builder emits--system-prompt-filewith the path, and does not emit--system-promptor--append-system-prompttest_types.pyandtest_transport.pycontinue to pass