Repository navigation
Feature: keep ACP conversation context when switching project folders - #150
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changing an ACP agent’s project folder previously restarted it with a fresh session and cleared its local conversation state. The pane now keeps its transcript and attempts to continue the existing agent session in the new folder. If the adapter starts fresh, users can choose whether to carry recent conversation text into that session.
For example, a user can ask an agent to remember a phrase, switch that pane to another project, and continue discussing it while the agent is told to use the new folder and re-read files.
What users will experience
Direct folder switching: Change Directory,
/change-directory, and!cdmove to the selected folder without an extra confirmation. Only that ACP agent restarts; other panes keep their own folders and conversations.Conversation continuity: Retain the transcript and try the adapter’s supported session continuation with the new folder. If continuation is unavailable or rejected, offer Carry recent context or Start fresh. The handoff is a bounded excerpt of up to eight recent messages and 12,000 characters; attachments are not transferred.
Clear project context: Before the next user request, send a separate update naming the old and new folders and asking the agent to re-read files before relying on earlier paths or contents. The original request then follows unchanged, including slash commands and image attachments.
Familiar, quieter feedback: Use the same “Changed directory to…” and “Switching to the new project — this conversation is kept” wording as native Ollama conversations. Folder restarts skip the repeated connection card, and internal acknowledgments stay out of the transcript. Errors, warnings, and actual tool activity remain visible.
Predictable recovery: If the context update fails or is cancelled, keep it pending and explain that the user’s request was not sent. Failed startup retains the continuation attempt for retry.
/clear, switching ACP agents, or returning to the native agent discards pending handoff context.One documentation home: Keep essential ACP setup and usage in the README. Remove the standalone
docs/acp.mdanddocs/acp-codex.mdguides and update their links and CLI references.Validation
/clear, compact restart output, and visible failures/tool output.Scope
Session continuation depends on the adapter. The optional text handoff supplies recent context when a full session cannot be continued; it is not a full session restoration or a generated summary. Initial connection cards and normal explicit session-resume behavior are retained.
Related to the ACP integration work in #144. The separate README badge cleanup is excluded.