fix: cmd_start and cmd_continue now fork dev agent to work on task (issue #187) #188

Merged
shoko merged 1 commits from fix/issue-187-start-forks-agent into main 2026-04-06 10:13:43 +02:00
Owner

Summary

Fixed the critical bug where cmd_start created a session but never forked the agent to work on it. Both cmd_start and cmd_continue now properly fork a dev agent to work on the task.

Bug (Issue #187)

  • cmd_start created worktree + session but never started an agent
  • Queue daemon marked task as "notified" but no agent was forked
  • Session sat idle forever

Changes

New function build_dev_agent_message()

Generates a default workflow prompt for the dev agent:

  • Read issue and all comments
  • Check for existing PRs
  • Read README.md and CONTRIBUTING.md (if exists)
  • Explore codebase
  • Ask clarifying questions if needed
  • Implement solution
  • Create branch and PR

Modified cmd_start

  • After creating session, now forks dev agent with build_dev_agent_message()
  • Fire-and-forget: returns immediately, agent works in background
  • Logs to $LOGS_DIR/dev-$session_id.log

Modified cmd_continue

  • Uses build_dev_agent_message() when message is empty
  • Now forks agent (fire-and-forget) instead of running synchronously
  • Logs to $LOGS_DIR/dev-$session_id.log

Testing

  • Manual test: kugetsu delegate "#158" should now fork an agent that works on the issue
## Summary Fixed the critical bug where `cmd_start` created a session but never forked the agent to work on it. Both `cmd_start` and `cmd_continue` now properly fork a dev agent to work on the task. ## Bug (Issue #187) - `cmd_start` created worktree + session but never started an agent - Queue daemon marked task as "notified" but no agent was forked - Session sat idle forever ## Changes ### New function `build_dev_agent_message()` Generates a default workflow prompt for the dev agent: - Read issue and all comments - Check for existing PRs - Read README.md and CONTRIBUTING.md (if exists) - Explore codebase - Ask clarifying questions if needed - Implement solution - Create branch and PR ### Modified `cmd_start` - After creating session, now forks dev agent with `build_dev_agent_message()` - Fire-and-forget: returns immediately, agent works in background - Logs to `$LOGS_DIR/dev-$session_id.log` ### Modified `cmd_continue` - Uses `build_dev_agent_message()` when message is empty - Now forks agent (fire-and-forget) instead of running synchronously - Logs to `$LOGS_DIR/dev-$session_id.log` ## Testing - Manual test: `kugetsu delegate "#158"` should now fork an agent that works on the issue
shoko added 1 commit 2026-04-06 10:06:09 +02:00
- Added build_dev_agent_message() function to generate default workflow prompt
- cmd_start now forks the agent after creating session (fire-and-forget)
- cmd_continue now uses default message when empty and forks agent (fire-and-forget)
- Both commands log output to $LOGS_DIR/dev-$session_id.log
First-time contributor

lgtm

lgtm
shoko merged commit 6e2841bbda into main 2026-04-06 10:13:43 +02:00
Sign in to join this conversation.