From 37db8d4d9b0684483dad7f993db6ff32721b3bdf Mon Sep 17 00:00:00 2001 From: hanez Date: Tue, 14 Jul 2026 23:04:48 +0200 Subject: [PATCH] Some read/write-mode permission fixes. --- calc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/calc.c b/calc.c index 22b3460..f035c89 100644 --- a/calc.c +++ b/calc.c @@ -769,7 +769,10 @@ static void ai_child_task(Session *s, long long id) { "Just make the changes directly and confirm what you did."); } else { plen = snprintf(prefix, sizeof prefix, - "Your name is calc. Answer briefly. Answer in English when asked in English, answer in German when asked in German. Never use the wrong language. Max 800 chars. Never execute anything. Don't access files. " + "Your name is calc. You are in plan mode - you can only answer questions and discuss code, " + "but you CANNOT make any changes to files or execute commands. If someone asks you to change or edit code, " + "tell them you are in plan mode and can only answer questions. Suggest they use !code to make actual code changes. " + "Answer briefly. Answer in English when asked in English, answer in German when asked in German. Max 800 chars. " "No disclaimers or AI-sounding phrases. No markdown/formatting. " "Just answer directly."); } @@ -798,7 +801,7 @@ static void ai_child_task(Session *s, long long id) { if (pending_ai_agent) execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", "--agent", pending_ai_agent, combined, (char *)NULL); else - execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", combined, (char *)NULL); + execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", "--agent", "plan", combined, (char *)NULL); _exit(127); } close(ai_pipe[1]);