Regression introduced in #456. claude_start/claude_run in kennel/worker.py call build_prompt(fido_dir, subskill, context) which writes two files:
fido_dir/system — persona.md + sub-skill.md (e.g. setup.md, task.md)
fido_dir/prompt — the context (request, repo, branch, etc.)
In the pre-session code path, print_prompt_from_file spawns a new claude with BOTH files — the sub-skill instructions are loaded as system prompt.
In the persistent-session path (if session is not None), only the prompt file is sent:
prompt = (fido_dir / "prompt").read_text()
with session:
session.send(prompt)
session.consume_until_result()
The persistent ClaudeSession was constructed with only sub/persona.md as its system prompt, so claude never sees setup.md. Result: claude responds to a bare context with no instructions and doesn't call kennel task add. Then:
RuntimeError: setup produced no tasks
Watchdog restarts the thread, it tries again, same failure. Observed live after #475 landed, leaving fido stuck on #465 with 3+ abandoned branches.
Fix: prepend fido_dir/system content to the user message when routing through the persistent session, so claude gets the sub-skill instructions as part of each turn. Something like:
system_content = (fido_dir / "system").read_text()
prompt = (fido_dir / "prompt").read_text()
with session:
session.send(f"{system_content}\n\n---\n\n{prompt}")
session.consume_until_result()
Apply to claude_start and claude_run both. Test that setup, task, ci, resume, and comments sub-skills all deliver their instructions through the persistent session.
Regression introduced in #456.
claude_start/claude_runinkennel/worker.pycallbuild_prompt(fido_dir, subskill, context)which writes two files:fido_dir/system— persona.md + sub-skill.md (e.g. setup.md, task.md)fido_dir/prompt— the context (request, repo, branch, etc.)In the pre-session code path,
print_prompt_from_filespawns a new claude with BOTH files — the sub-skill instructions are loaded as system prompt.In the persistent-session path (
if session is not None), only the prompt file is sent:The persistent
ClaudeSessionwas constructed with onlysub/persona.mdas its system prompt, so claude never sees setup.md. Result: claude responds to a bare context with no instructions and doesn't callkennel task add. Then:Watchdog restarts the thread, it tries again, same failure. Observed live after #475 landed, leaving fido stuck on #465 with 3+ abandoned branches.
Fix: prepend
fido_dir/systemcontent to the user message when routing through the persistent session, so claude gets the sub-skill instructions as part of each turn. Something like:Apply to
claude_startandclaude_runboth. Test that setup, task, ci, resume, and comments sub-skills all deliver their instructions through the persistent session.