fix: --system is not a valid Claude Code CLI flag

Removed the --system argument from the PTY runner — Claude Code CLI
doesn't support it. Bot name instruction is now prepended to the user
prompt instead of passed as a system prompt argument.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dave
2026-03-18 11:42:39 +00:00
parent db92a78d2b
commit 77e368d354
2 changed files with 6 additions and 9 deletions

View File

@@ -748,11 +748,10 @@ async fn handle_message(
// The prompt is just the current message with sender attribution.
// Prior conversation context is carried by the Claude Code session.
let prompt = format_user_prompt(&sender, &user_message);
let bot_name = &ctx.bot_name;
let system_prompt = format!(
"Your name is {bot_name}. Refer to yourself as {bot_name}, not Claude."
let prompt = format!(
"[Your name is {bot_name}. Refer to yourself as {bot_name}, not Claude.]\n\n{}",
format_user_prompt(&sender, &user_message)
);
let provider = ClaudeCodeProvider::new();
@@ -792,7 +791,7 @@ async fn handle_message(
&prompt,
&project_root_str,
resume_session_id.as_deref(),
Some(&system_prompt),
None,
&mut cancel_rx,
move |token| {
let mut buf = buffer_for_callback.lock().unwrap();