Skip to content

Session-state artifact storage (~/.copilot/session-state/<id>/files/) strands project deliverables outside the active Git repository #5384

Open

Description

@fabioc-aloha

Summary

When working inside a Git repository, agent sessions frequently save project deliverables (architecture audits, test reports, readiness reviews, and one-off verification helper scripts) into ~/.copilot/session-state/<session-id>/files/ instead of the active repository worktree.

Because the files exist on disk in the session folder and are linked in the chat output, the task appears complete—but the repository itself is left missing those deliverables and reproducibility scripts across branches, clones, and subsequent sessions.

Environment

  • GitHub Copilot CLI: 1.0.107 / VS Code Agent Host (vscode-agent-host)
  • OS: Windows 11 x64 (win32)
  • Git: 2.56.0.windows.4

Steps to Reproduce

  1. Open an agent session in a Git repository workspace.
  2. Ask the agent to produce a project audit report, readiness review, or verification helper script during multi-step analysis or release verification.
  3. Observe that the agent writes the Markdown report or .cjs/.mjs helper script under ~/.copilot/session-state/<session-id>/files/ and surfaces a link to that file.
  4. Check git status in the repository worktree.

Actual Behavior

  • Project deliverables and helper scripts remain stranded in ~/.copilot/session-state/<session-id>/files/ outside the repository.
  • Over multiple sessions, important project documentation, review records, and verification scripts accumulate in opaque UUID session folders without being tracked or discoverable in the repository.

Expected Behavior

  • Session storage (~/.copilot/session-state/<session-id>/files/) should be reserved for disposable runtime scratch, while requested project deliverables (plans, reports, documentation, and helper scripts) default to or are validated against the active Git repository worktree unless the user explicitly requests an external destination.
  • Artifact presentation / completion should clearly distinguish or warn when a deliverable was written to ephemeral session state rather than the active repository worktree.

Activity

  1. added
    area:sessionsSession management, resume, history, session picker, and session state
    area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
    and removed on Nov 8, 2026
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

    area:sessionsSession management, resume, history, session picker, and session statearea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions