loop: disable multiple choice tool in oneshot mode
This change disables the multiple choice tool when Sketch is running in one-shot mode.
It adds an OneShot flag to the AgentConfig struct and conditionally includes
the multiple choice tool based on this flag.
Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/loop/agent.go b/loop/agent.go
index b5de370..0f08d36 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -696,6 +696,7 @@
ClientGOARCH string
InDocker bool
UseAnthropicEdit bool
+ OneShot bool
// Outside information
OutsideHostname string
OutsideOS string
@@ -864,7 +865,12 @@
convo.Tools = []*llm.Tool{
bashTool, claudetool.Keyword,
claudetool.Think, a.titleTool(), a.precommitTool(), makeDoneTool(a.codereview, a.config.GitUsername, a.config.GitEmail),
- a.codereview.Tool(), a.multipleChoiceTool(),
+ a.codereview.Tool(),
+ }
+
+ // One-shot mode is non-interactive, multiple choice requires human response
+ if !a.config.OneShot {
+ convo.Tools = append(convo.Tools, a.multipleChoiceTool())
}
convo.Tools = append(convo.Tools, browserTools...)