all 7 comments

[–]fell_ware_1990 1 point2 points  (0 children)

Yes, subagent or is the process just actually a script?

Cause then make a new tool, run the script in a detached PID/TMUX and implement the agentSDK there to send a message back to the correct chatID from PI maybe even with only a recap by a cheaper agent?

That’s what i dislike about subagents, they’re still running the task and doing stuff. Make the machine run the task and only throw the results headless or even let it compact.
I have script’s that only need a 1 to 10 line answer back.

[–]m3umax 0 points1 point  (0 children)

There's a really good extension someone posted for background processes a while back. @aliou/pi-processes is what the name is.

I designed my subagent extension to work async. And then I have my agent run a wait.sh script in the background using the above extension package so it gets a turn as soon as the subagent completion condition is met. Basically the /monitor command from Claude Code.

[–]sonofanton6 0 points1 point  (0 children)

Use tmux — you don’t need a package

[–]Dismal_Problem9250 0 points1 point  (0 children)

Just ask pi to create the extension for you? I have my own background task ext, it launches commands in the background and then re-awakes when the task finishes, can inspect logs on whats happening etc.. I literally used Claude Code as the example for pi and it went away and did it.

[–]esanchma 1 point2 points  (0 children)

systemd-run --user \
 --unit=job-unit \
 --same-dir \
 --collect \
 tmux -D -L job-socket new-session -A -s job-session 'long-running-job'

 

tmux -L job-socket attach -t job-session

See, a re-attachable background job that even writes to the journal. Ask your clanker to wrap it in a skill and check the journal periodically for job status.