fix(kugetsu): export KUGETSU_TEMP_DIR for subagent workflows
- Add KUGETSU_TEMP_DIR to default config (commented, defaults to ~/.local/share/opencode/tool-output) - Export KUGETSU_TEMP_DIR in cmd_delegate to subagent sessions - This directory is allowed by opencode unlike /tmp which may be blocked Fixes #73
This commit is contained in:
@@ -523,7 +523,9 @@ cmd_delegate() {
|
|||||||
|
|
||||||
mkdir -p "$LOGS_DIR"
|
mkdir -p "$LOGS_DIR"
|
||||||
local log_file="$LOGS_DIR/delegate-$(date +%s).log"
|
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
|
disown
|
||||||
echo "Delegated to PM agent (logged to $(basename "$log_file"))"
|
echo "Delegated to PM agent (logged to $(basename "$log_file"))"
|
||||||
}
|
}
|
||||||
@@ -694,6 +696,10 @@ cmd_init() {
|
|||||||
|
|
||||||
# Max concurrent dev agents (default: 3)
|
# Max concurrent dev agents (default: 3)
|
||||||
# MAX_CONCURRENT_AGENTS=5
|
# 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
|
EOF
|
||||||
echo "Created config file: $KUGETSU_DIR/config"
|
echo "Created config file: $KUGETSU_DIR/config"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user