fix(kugetsu): export KUGETSU_TEMP_DIR for subagent workflows #92
Reference in New Issue
Block a user
Delete Branch "fix/issue-73-temp-dir-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix for #73 - OpenCode /tmp/* Permission Blocking Subagent Workflows.
Problem
Subagent workflows try to write to /tmp which is blocked by opencode in headless mode.
Solution
Export KUGETSU_TEMP_DIR in cmd_delegate:
~/.local/share/opencode/tool-output${KUGETSU_TEMP_DIR:-/tmp}instead of raw/tmpChanges
Add
export KUGETSU_TEMP_DIRto the env_sh in cmd_delegate.Usage
Agents should use:
Fixes #73
does it work? can you confirm by creating unit tests? if its confirmed, we can add the unit test as well to our kugetsu skill folder. also can we document it as well in the SKILL.md? basically in the config file, we should be able to adjust the TEMP DIR thingy so user are free to change it anywhere they want
Good points! Let me:
Currently its hardcoded with a default. Ill make it so users can override it in their config.
lgtm
I addressed your feedback:
The default is ~/.local/share/opencode/tool-output which works in headless environments where /tmp is restricted.
we can merge this PR