fix(kugetsu): export KUGETSU_TEMP_DIR for subagent workflows #85

Closed
shoko wants to merge 1 commits from fix/issue-73-temp-dir-config into main

View File

@@ -523,7 +523,9 @@ cmd_delegate() {
mkdir -p "$LOGS_DIR"
local log_file="$LOGS_DIR/delegate-$(date +%s).log"
nohup sh -c "opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 &
local temp_dir="${KUGETSU_TEMP_DIR:-$HOME/.local/share/opencode/tool-output}"
nohup sh -c "export KUGETSU_TEMP_DIR='$temp_dir'; opencode run '$message' --continue --session '$pm_session' >> '$log_file' 2>&1" > /dev/null 2>&1 &
disown
echo "Delegated to PM agent (logged to $(basename "$log_file"))"
}
@@ -694,6 +696,10 @@ cmd_init() {
# Max concurrent dev agents (default: 3)
# MAX_CONCURRENT_AGENTS=5
# Temporary directory for agent operations (default: ~/.local/share/opencode/tool-output)
# This directory is allowed by opencode, unlike /tmp which may be blocked
# KUGETSU_TEMP_DIR="$HOME/.local/share/opencode/tool-output"
EOF
echo "Created config file: $KUGETSU_DIR/config"
fi