Skip navigation
finally ported my fav Claude Code feature into Pi: `/subtask`
0:00 / 0:20

finally ported my fav Claude Code feature into Pi: `/subtask`

Victor M

@victormustar33K followers

Visit on X
283 likesDownloadOriginal post

18,595 views

finally ported my fav Claude Code feature into Pi: `/subtask` a subtask is a fork of your current conversation, it inherits everything you've discussed, works in the background, and sends only its final answer back into the conversation that spawned it. Less context pollution/bloating and you can continue the main conversation as subtasks are running. here's what's packed into the Pi extension: - a live panel under the prompt: ↑↓ to select, enter to watch a fork work in real time, x to stop or dismiss it - steer a running fork mid-task, or resume a finished one without losing its progress - the model can spawn subtasks on its own and keep working while it waits for the result - forks reuse the parent's prompt cache, so they're cheaper than briefing a subagent - every fork's transcript is a real pi session: reopen it any time with `pi --session `

33 Comments

Comments from the original post on X (Twitter)

  • Victor M's profile picture

    @victormustar

    repo:

    13 likes

  • Pi's profile picture

    @pidotdev

    😍😍

    5 likes

  • Andrey's profile picture

    @onsails

    Recently published similar plugin which relies on herdr or tmux: /fork-in-herdr or /fork-in-tmux to create a tab with a forked session

    2 likes

  • Bambang Tri Rahmat Doni's profile picture

    @bengi_dev

    Is that each stack can have different model, or just inherited from its parent?

    1 like

  • Victor M's profile picture

    @victormustar

    inherited from parent but easy to change if needed

  • Rui Carmo ☯️'s profile picture

    @rcarmo

    Erm. How different is that from using /tree really?

    1 like

  • Victor M's profile picture

    @victormustar

    /tree is navigation. this spawns another Pi with a copy of your conversation that runs in the background while you keep working then reports back its final output

  • Rui Carmo ☯️'s profile picture

    @rcarmo

    Well, I use sub sessions in piclaw that do the same without a sub process, and that fold back into tree

  • Victor M's profile picture

    @victormustar

    i don’t know piclaw it’s probably prompted to know how to use Pi so that’s something else

  • Rui Carmo ☯️'s profile picture

    @rcarmo

    I wrote it. The kind of session forking and folding you are describing does not need subprocesses, and can be built atop the session tree -

  • Victor M's profile picture

    @victormustar

    interesting I'll take a look if I can make this work inside the TUI and take a look at piclaw

  • Victor M's profile picture

    @victormustar

    how do you handle extensions in a single process?

  • Rui Carmo ☯️'s profile picture

    @rcarmo

    There’s an entire extension and add-on subsystem - most of piclaw is a separate event loop and extensions, just point pi at the repo.

    1 like

  • Artale's profile picture

    @artale93

    Let's gooo

    1 like

  • Alek 🤗🦙's profile picture

    @alekgrygier

    Good stuff

    1 like

  • Monty's profile picture

    @mont_py

    sweet

    1 like

  • Lakshman Patel's profile picture

    @Lakshman2302

    Thank you 😊

    1 like

  • Buswe's profile picture

    @buswe_com

    Que la subtask solo devuelva la respuesta final mantiene limpio el hilo padre y evita arrastrar todo el ruido del trabajo intermedio.

    1 like

  • Alex Mrvaljevich's profile picture

    @alexmrv

    Oooo really nice! Might submit a pr to detect if you are in herdr and have the sub task start in a pane

    1 like

  • Victor M's profile picture

    @victormustar

    i don’t understand herdr but people seem to like it maybe i should try lol