Make delegate synchronous when no issue ref is provided #254

Closed
opened 2026-04-08 06:55:40 +02:00 by shoko · 0 comments
Owner

Problem

Currently when 'kugetsu delegate' is called without an issue ref, it runs fire-and-forget (async) with nohup. This means:

  1. The process detaches and runs in background
  2. User gets no immediate feedback
  3. Long-running PM interaction happens asynchronously

User Request

When no issue ref is provided, delegate should run synchronously - waiting for PM response immediately. This is because:

  1. Without an issue ref, we're delegating to PM for guidance/creation
  2. This should be a short, interactive exchange
  3. User should see the PM response immediately, not have it run in background

Current Behavior

In cmd_delegate (kugetsu-session.sh:211-231):

  • Creates new session from base session
  • Runs: nohup sh -c "opencode run ..." >> "" 2>&1 &
  • Returns immediately (fire-and-forget)

Desired Behavior

When no issue ref is detected:

  1. Run 'opencode run' interactively (NOT with nohup, NOT in background)
  2. Block and wait for PM response
  3. User sees the interaction in real-time
  4. Upon completion, return to shell

Implementation

Remove nohup and '&' from line 230 in kugetsu-session.sh:
Current:
nohup sh -c "GITEA_TOKEN='' opencode run '@' --session ''" >> "" 2>&1 &

Change to:
sh -c "GITEA_TOKEN='' opencode run '@' --session ''" 2>&1 | tee ""

This runs synchronously and logs to both terminal and file.

Status

READY - No dependencies

Files

  • skills/kugetsu/scripts/kugetsu-session.sh (cmd_delegate function)

Parent: #235

## Problem Currently when 'kugetsu delegate' is called without an issue ref, it runs fire-and-forget (async) with nohup. This means: 1. The process detaches and runs in background 2. User gets no immediate feedback 3. Long-running PM interaction happens asynchronously ## User Request When no issue ref is provided, delegate should run synchronously - waiting for PM response immediately. This is because: 1. Without an issue ref, we're delegating to PM for guidance/creation 2. This should be a short, interactive exchange 3. User should see the PM response immediately, not have it run in background ## Current Behavior In cmd_delegate (kugetsu-session.sh:211-231): - Creates new session from base session - Runs: nohup sh -c "opencode run ..." >> "" 2>&1 & - Returns immediately (fire-and-forget) ## Desired Behavior When no issue ref is detected: 1. Run 'opencode run' interactively (NOT with nohup, NOT in background) 2. Block and wait for PM response 3. User sees the interaction in real-time 4. Upon completion, return to shell ## Implementation Remove nohup and '&' from line 230 in kugetsu-session.sh: Current: nohup sh -c "GITEA_TOKEN='' opencode run '@' --session ''" >> "" 2>&1 & Change to: sh -c "GITEA_TOKEN='' opencode run '@' --session ''" 2>&1 | tee "" This runs synchronously and logs to both terminal and file. ## Status **READY** - No dependencies ## Files - skills/kugetsu/scripts/kugetsu-session.sh (cmd_delegate function) ## Related Issue Parent: #235
shoko added the ready label 2026-04-08 06:55:46 +02:00
shoko closed this issue 2026-04-08 13:24:20 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#254