Repository navigation
fix(ai-vault): show Copilot sessions under their workspace with the original prompt as title - #31160
Merged
nwparker merged 4 commits intoOct 24, 2026
Conversation
…riginal prompt as title Copilot sessions in Agent Session History showed "Unknown location" and titles prefixed with an injected <current_datetime> tag. The Copilot parser only learned a session's folder from the "Folder X has been added to trusted folders" notice, which Copilot does not write for every session. It now reads the launch directory, git root and branch from session.start's context, and the trust notice only fills a folder the start did not name, so resume runs in the start directory as it does for other agents. User messages now take the original `content` before `transformedContent`, which carries context Copilot injects. `current_datetime` joins the hidden blocks so a transformed-only message still gets a clean title. Bump the session parse cache schema so histories cached with the old parser are re-read once instead of keeping the wrong folder and title. Fixes stablyai#30985
Contributor
# Conflicts: # src/main/ai-vault-search/session-search-schema.ts # src/main/ai-vault/session-parse-cache-database.ts
This was referenced Oct 24, 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.
ELI5
Copilot sessions in Agent Session History could appear under Unknown location with timestamp markup in their titles. The history now uses the recorded launch folder and branch, shows the original prompt, and builds Resume commands for that folder.
What Changed
session.start.data.context.cwd(falling back togitRoot) andbranch. Legacy folder-trust notices fill only a missing launch directory.contentover Copilot's model-facingtransformedContentfor titles, previews, and the existing transcript consumer. Suppresscurrent_datetimeblocks in titles/previews when only transformed content is available.addSessionTextintegration.Linked Issue
Fixes #30985
Visual Proof
N/A. This changes transcript parsing and cache semantics. Verification uses real JSONL files, the production parser and cached reader, and real SQLite metadata/search stores; no renderer layout changes.
Testing
d9dc87b2fb08before production edits: six of the original author's seven real-file parser regressions failed. Failures covered missing cwd, trust-notice override, Windows resume location, original prompt selection, and transformed-only datetime markup.448299cfbb98.git diff --checkpass.448299cfbb98. Cache rebuild/performance review also found no blocker.Review
Merge risk: low, following independent adversarial source and evidence review. The material cost is one full metadata/search cache rebuild across agents after upgrade. Search results repopulate through the normal background indexer; transcripts remain the source of truth.
No new path parsing, shell quoting, process launch, IPC, or wire fields. Windows paths pass through to the existing resume-command builder; Unix and Windows resume behavior are covered. Folder workspaces can supply cwd without git metadata. Local, SSH/WSL/server, and mobile consumers keep the same session contract; older hosts retain their parsing until upgraded.
AI Disclosure
Anmol Bhardwaj's original investigation, implementation and tests used Claude Code, as documented in the preserved original commit. Maintainer reproduction, current-main adaptation, cache correction, and review used native Codex agents.
Agent skill upstream boundary
Author
Original fix by Anmol Bhardwaj (@anmol0b). Original commit
62cf5e884035is preserved as an ancestor of this updated PR.Checklist