Bump to 0.2.0 and make max tool-call iterations configurable

The 8-iteration-per-turn cap was hardcoded from before this session's feature work and
too tight for genuine multi-file tasks, causing "Max tool-call iterations reached" on
legitimately multi-step work. Raised the default to 25 and made it configurable via
`locode config set maxIterations <n>` / $LOCODE_MAX_ITERATIONS, mirroring the existing
contextWindow config pattern.

Also bumps the version to 0.2.0 (package.json, --version, and the MCP client's
self-reported identity) to reflect the substantial feature additions since 0.1.0.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
kim
2026-07-06 18:08:49 +09:00
co-authored by Claude Sonnet 5
parent 3f1527375c
commit 4e6c0bb216
9 changed files with 35 additions and 14 deletions
+7 -7
View File
@@ -18,7 +18,7 @@ function addBackendOptions(cmd: Command): Command {
program
.name("locode")
.description("Agentic coding CLI for local models via Ollama and LM Studio")
.version("0.1.0");
.version("0.2.0");
addBackendOptions(program)
.option("-m, --model <name>", "model name as known to the backend")
@@ -108,20 +108,20 @@ configCmd
configCmd
.command("set <key> <value>")
.description("Persist a config value (backend, model, baseUrl, contextWindow)")
.description("Persist a config value (backend, model, baseUrl, contextWindow, maxIterations)")
.action((key: string, value: string) => {
if (key !== "backend" && key !== "model" && key !== "baseUrl" && key !== "contextWindow") {
console.error(`Unknown config key "${key}". Valid keys: backend, model, baseUrl, contextWindow`);
if (key !== "backend" && key !== "model" && key !== "baseUrl" && key !== "contextWindow" && key !== "maxIterations") {
console.error(`Unknown config key "${key}". Valid keys: backend, model, baseUrl, contextWindow, maxIterations`);
process.exit(1);
}
const stored = loadStoredConfig();
if (key === "contextWindow") {
if (key === "contextWindow" || key === "maxIterations") {
const n = Number(value);
if (!Number.isFinite(n) || n <= 0) {
console.error(`contextWindow must be a positive number, got "${value}".`);
console.error(`${key} must be a positive number, got "${value}".`);
process.exit(1);
}
stored.contextWindow = n;
stored[key] = n;
} else {
stored[key] = value;
}