--append
This commit is contained in:
@@ -17,7 +17,8 @@ export type OpenAITool = {
|
|||||||
|
|
||||||
export type ClaudeDispatchOptions = {
|
export type ClaudeDispatchOptions = {
|
||||||
prompt: string;
|
prompt: string;
|
||||||
/** System prompt passed via --system-prompt on every invocation (stateless, not stored in session) */
|
/** Appended to Claude Code's built-in system prompt via --append-system-prompt on every invocation.
|
||||||
|
* Stateless: not persisted in session file, fully replaces any prior appended content on resume. */
|
||||||
systemPrompt?: string;
|
systemPrompt?: string;
|
||||||
workspace: string;
|
workspace: string;
|
||||||
agentId?: string;
|
agentId?: string;
|
||||||
@@ -115,11 +116,12 @@ export async function* dispatchToClaude(
|
|||||||
"--dangerously-skip-permissions",
|
"--dangerously-skip-permissions",
|
||||||
];
|
];
|
||||||
|
|
||||||
// --system-prompt is stateless (not persisted in session file) and fully
|
// --append-system-prompt appends to Claude Code's built-in system prompt rather
|
||||||
// replaces any prior system prompt on each invocation, including resumes.
|
// than replacing it, preserving the full agent SDK instructions (tool use behavior,
|
||||||
// We pass it every turn so skills/persona stay current.
|
// memory management, etc.). The appended bootstrap (persona + skills) is stateless:
|
||||||
|
// not persisted in the session file, takes effect every invocation including resumes.
|
||||||
if (systemPrompt) {
|
if (systemPrompt) {
|
||||||
args.push("--system-prompt", systemPrompt);
|
args.push("--append-system-prompt", systemPrompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resumeSessionId) {
|
if (resumeSessionId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user