Skip to content

[FEATURE]: Allow parentID when forking sessions #16639

@pedrovhb

Description

@pedrovhb

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions