Disable plan mode in system prompt when using print option
This commit is contained in:
parent
f9f87862b0
commit
e048b20e5c
|
|
@ -149,12 +149,16 @@ export async function status(): Promise<"running" | "stopped" | "missing"> {
|
|||
/** Launch claude in the container at the given workdir. */
|
||||
export async function claude(workdir: string, opts?: { prompt?: string; print?: string }): Promise<string | void> {
|
||||
const cwd = containerPath(workdir)
|
||||
const systemPrompt = [
|
||||
const systemPromptLines = [
|
||||
"You are running inside a sandlot container (Apple Container, ubuntu:24.04).",
|
||||
`Your working directory is ${cwd}, a git worktree managed by sandlot.`,
|
||||
"The host's ~/dev is mounted read-only at /host.",
|
||||
"The host's ~/.sandlot is mounted at /sandlot.",
|
||||
].join("\n")
|
||||
]
|
||||
if (opts?.print) {
|
||||
systemPromptLines.push("IMPORTANT: Do not use plan mode. Do not call the EnterPlanMode tool. Proceed directly with the task.")
|
||||
}
|
||||
const systemPrompt = systemPromptLines.join("\n")
|
||||
|
||||
const term = process.env.TERM || "xterm-256color"
|
||||
const args = ["container", "exec", "-it", "--user", USER, "--workdir", cwd, CONTAINER_NAME, "env", `TERM=${term}`, CLAUDE_BIN, "--dangerously-skip-permissions", "--model", "claude-opus-4-6", "--append-system-prompt", systemPrompt]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user