Feature hasn't been suggested before.
Describe the enhancement you want to request
The task tool, and custom tools like it, can create child sessions by creating a session with a specific parentID.
It would be useful if session.fork() also accepted an optional parentID for the newly created session.
Forking is useful when a caller wants to partition work into a contained session while reusing an existing transcript and its prompt-cache benefits.
Today, callers can either:
- create a child session with the right parent, or
- fork an existing session to reuse context
but not both at the same time.
Allowing session.fork() to accept parentID?: string would let tools create child sessions that preserve both:
- session hierarchy
- efficient transcript/context reuse
Feature hasn't been suggested before.
Describe the enhancement you want to request
The
tasktool, and custom tools like it, can create child sessions by creating a session with a specificparentID.It would be useful if
session.fork()also accepted an optionalparentIDfor the newly created session.Forking is useful when a caller wants to partition work into a contained session while reusing an existing transcript and its prompt-cache benefits.
Today, callers can either:
but not both at the same time.
Allowing
session.fork()to acceptparentID?: stringwould let tools create child sessions that preserve both: