Subagent workflow: PM agent cannot write to /tmp for comment posting #45

Closed
opened 2026-03-31 12:09:39 +02:00 by shoko · 1 comment
Owner

Problem

PM agent tried to post test results as issue comment but was blocked:

! permission requested: external_directory (/tmp/*); auto-rejecting
✗ write failed

The subagent workflow uses write_file to create a temporary file, then posts via curl -d @/tmp/file. But PM agent session has /tmp/* blocked.

Options to Fix

Option 1: Write to kugetsu session folder instead

PM agent has access to ~/.kugetsu/ which is where logs are written. Could write comment drafts there instead of /tmp/.

Option 2: Use curl directly without file

The curl command could construct the JSON body inline instead of reading from file:

curl -X POST -H 'Content-Type: application/json' -d '{"body":"comment text"}' 'url'

Option 3: Update PM agent session permissions

Allow /tmp/* in PM agent session permissions.

Recommendation

Option 1 (write to ~/.kugetsu/) seems cleanest - keeps temporary files within the kugetsu ecosystem rather than expanding /tmp permissions.

Could create a helper script at ~/.kugetsu/post-comment.sh that the PM agent calls instead of writing files directly.

## Problem PM agent tried to post test results as issue comment but was blocked: ``` ! permission requested: external_directory (/tmp/*); auto-rejecting ✗ write failed ``` The subagent workflow uses `write_file` to create a temporary file, then posts via `curl -d @/tmp/file`. But PM agent session has `/tmp/*` blocked. ## Options to Fix ### Option 1: Write to kugetsu session folder instead PM agent has access to `~/.kugetsu/` which is where logs are written. Could write comment drafts there instead of `/tmp/`. ### Option 2: Use curl directly without file The curl command could construct the JSON body inline instead of reading from file: ```bash curl -X POST -H 'Content-Type: application/json' -d '{"body":"comment text"}' 'url' ``` ### Option 3: Update PM agent session permissions Allow `/tmp/*` in PM agent session permissions. ## Recommendation Option 1 (write to ~/.kugetsu/) seems cleanest - keeps temporary files within the kugetsu ecosystem rather than expanding /tmp permissions. Could create a helper script at `~/.kugetsu/post-comment.sh` that the PM agent calls instead of writing files directly.
shoko added the critical label 2026-04-01 01:41:28 +02:00
shoko added the task-delegation label 2026-04-02 00:30:40 +02:00

no longer relevant, there are other solution

no longer relevant, there are other solution
shoko closed this issue 2026-04-05 07:12:42 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#45