[FEATURE]: command that is run as a subtask if in an existing session, as the main task if in a new session
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Example: I have a /summarize_paper command that prompts a researcher agent to summarize a paper. Sometimes it's because I'm in the middle of a conversation with a primary agent and I want to summarize this paper to get it's information for this conversation. Sometimes I am just creating a new session to summarize the paper (to a document) and then that's it, but for now with subtask: true it starts a conversation with whatever primary agent I had selected and then that spawns a subtask that does the summarizing, the parent agent is a complete waste of tokens
This issue might be a duplicate of existing issues. Please check:
- #2315: Custom commands with agents should(?) run in isolated sessions - discusses the behavior of commands with agents and whether they should run in isolated sessions
- #3329: Custom commands with agents should(?) change to the agent session - discusses context switching behavior for commands with agent specifications
These issues explore similar concerns about how custom commands behave when they reference agents and whether they should adapt their execution model based on the session context (new vs existing session).
Feel free to ignore if your specific use case differs from these.