docs: clarify session close vs delete semantics (upstream sync #599)#177
Open
docs: clarify session close vs delete semantics (upstream sync #599)#177
Conversation
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync with upstream changes from copilot-sdk
docs: clarify session close vs delete semantics (upstream sync #599)
Mar 6, 2026
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.
Ports upstream commit
4e1499d— clarifies the distinction between closing a session (releases in-memory resources, preserves disk state) and deleting a session (permanent, irreversible removal of all data from disk).Before the change?
stop()Javadoc said "Stops the client and closes all sessions" with no mention of disk persistencedeleteSession()Javadoc said "permanently removes the session and its conversation history" with no contrast againstclose()CopilotSessionclass Javadoc had no lifecycle guidance onAutoCloseablesemanticsdocumentation.mdonly showeddeleteSession()with no mention ofclose()After the change?
CopilotClient.stop()— updated Javadoc clarifies sessions are closed (in-memory resources released), disk data is preserved for later resumption, and directs users todeleteSession()for permanent removalCopilotClient.deleteSession()— updated Javadoc explicitly contrasts withclose(): deletes conversation history, planning state, and artifacts from disk; irreversibleCopilotSessionclass Javadoc — new paragraph explainingAutoCloseablesemantics:close()preserves disk state; usedeleteSession()to permanently remove datadocumentation.md— "Clean Up Sessions" section now shows both operations with explanatory prose:Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkstyle.org/opt/hostedtoolcache/CodeQL/2.24.2/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.2/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.2/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/working/files-to-index10455151215928970412.list --sourceArchiveDir=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/src --outputDir=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/trap/java which .0.18-8/x64/bin/git(dns block)https://api.github.com/graphql/usr/bin/gh gh pr list --head copilot/sync-upstream-changes-c4886a91-010c-45c9-8dcc-6c8f8229fe9a --json number,title va/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot /tmp/copilot-tesgit remote nfig/composer/veb5e56efe8253000b3a050623ebaa22b739fc7d16:src/test/java/com/github/copilot/sdk/CopilotSessionTest.java va/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot git git which k/copilot-sdk-java/copilot-sdk-java/target/node_modules/.bin/sh(http block)/usr/bin/gh gh pr edit 177 --repo copilot-community-sdk/copilot-sdk-java --add-label upstream-sync _ _ _ _ gh /.bin/tsx /usr/lib/jvm/temremote sh 43:44:46 which tnet/tools/which-Dcodeql.chainer.v2=/tmp/codeql.RTE3SeP2 which(http block)https://api.github.com/repos/copilot-community-sdk/copilot-sdk-java/issues/177/labels/usr/bin/curl curl -s -X POST -H Authorization: ****** Content-Type: application/json -d {"labels":["upstream-sync"]} REDACTED git -C b/copilot/sdk/CopilotClient.java remote /lib/jspawnhelper tsx server.ts which ot-sdk/test/harncopilot/sync-upstream-changes-c4886a91-010c-45c9-8dcc-6c8f8229fe9a /lib/jspawnhelper(http block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.