fix(01-02): read model/max_turns from persona settings object

Persona JSON nests model and max_turns under "settings" but the
subprocess was looking for them at the top level, so --model and
--max-turns were never passed to claude CLI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikkel Georgsen 2026-02-04 18:18:38 +00:00
parent faab47afbd
commit 2302b75e14

View file

@ -153,10 +153,11 @@ class ClaudeSubprocess:
if self._persona:
if "system_prompt" in self._persona:
cmd.extend(["--system-prompt", self._persona["system_prompt"]])
if "max_turns" in self._persona:
cmd.extend(["--max-turns", str(self._persona["max_turns"])])
if "model" in self._persona:
cmd.extend(["--model", self._persona["model"]])
settings = self._persona.get("settings", {})
if "max_turns" in settings:
cmd.extend(["--max-turns", str(settings["max_turns"])])
if "model" in settings:
cmd.extend(["--model", settings["model"]])
# Add --continue if prior session exists
if (self._session_dir / ".claude").exists():