Skip to content

Session chaining #5348

Closed as not planned
Closed as not planned

Description

@rockyicer

What feature would you like to see?

Currently, when a conversation for a large task (e.g., developing a complex piece of code, writing a long document, step-by-step problem solving) approaches the context token limit, the session effectively ends. The workflow is broken, and the only workaround is to manually:

Summarize the progress and context from the previous chat.
Start a brand new chat.
Paste the summary and try to prompt the model to pick up where it left off.
This manual process is cumbersome, error-prone, and, most importantly, it completely shatters the creative and logical flow. It feels like trying to build a skyscraper but having to manually carry your tools up from the ground floor every 20 stories.

The Solution: Automatic "Session Chaining"

I envision a feature where the system can automatically handle this transition.
Proactive Monitoring: The system detects when the current session's token count is approaching its limit (e.g., at 99% capacity).
Automated Handoff Trigger: Instead of just failing or cutting off, it triggers an automated "handoff" process.
Intelligent Summarization: The model internally generates a concise summary of the current task, including key context, progress, code snippets, and the immediate next step.
Seamless New Session: It then automatically initiates a new session, pre-pending it with this generated summary as the foundational context.
Uninterrupted Continuation: The model then seamlessly continues with the task, picking up exactly where it left off, without the user needing to do anything.
To the user, this would feel like one continuous, infinite conversation, even though it's technically a chain of linked sessions behind the scenes.

Additional information

The Benefits:
Unbroken Workflow: This would be a game-changer for maintaining focus and momentum on large-scale projects.
Enables More Complex Tasks: It would unlock the ability to tackle even more ambitious projects that are currently impractical due to context limits.
Vastly Improved User Experience: It removes a major point of friction and makes the interaction feel truly intelligent and collaborative.
This feature would elevate Codex from a powerful tool to a true long-term project partner.

Thanks for considering this! Hope to see something like this in the future.

Activity

  1. added
    enhancement
    on Oct 19, 2025
  2. KeystoneScience commented on Oct 19, 2025

    @KeystoneScience

    Interesting. It could be great to have the chat history keep directory information and a quick embedding of the topic (embeddings can be done lightweight, and provide a very fast lookup for relevant conversations, though condensed summaries are also great imo), then you can run codex and have it look at previous relevant conversations as part of an initialization and be a great long term project partner. Not sure if it will get approved, but I like your idea and think it will make codex quite a bit better

  3. interconnectedMe commented on Oct 24, 2025

    @interconnectedMe

    I'd love this.

    At the moment, ChatGPT Agent (VScode, Codex extension, desktop) has suggested that I export (and possibly summarise) each chat, then create working documents, saved in the repo, that can be referenced from within the repo later. But it's not very joined up (and also affected by Chat / Task History not syncing outside of VScode Codex on desktop / Codespaces).

    As well as Session Chaining, I'd like it if all chats within, say a ChatGPT project, were 'known' to the Agent. And could be delved into from the current Chat/Task History, as and when the Agent required any detail of previous workflows / info.

  4. rockyicer commented on Oct 30, 2025

    @rockyicer
    Author

    this feather is added, after I try for one week, I can comfirm it works very well!!!
    a huge thank you to the team for implementing the automatic session continuation feature. It's a fantastic quality-of-life improvement and has made working on long tasks so much more convenient!

  5. changed the title [-]add Session Chaining[/-] [+]Session chaining[/+] on Nov 15, 2025
  6. etraut-openai commented on Dec 14, 2025

    @etraut-openai
    Contributor

    This feature hasn't received any upvotes or additional posts in a long time, so I'm going to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions