github / github/copilot-cli

Option to discard temp files created by copilot cli during analysis

Open
#3,007 0 comments 1 reaction 0 assignees View on GitHub
area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### Describe the feature or problem you'd like to solve

During the session, copilot tool calls produced outputs which were save dot temp files. I had a json file in my repo. Copilot created a python script to read the file and that temp file was a result of that. It contains essentially the same information as my json file. Copilot cli should offer a feature to clean up temp files at the end of a task or provide a session cleanup mechanism and options

### Proposed solution

An option to enable the following behaviors: after Copilot finishes reading the temp file and completes the task, it should delete the temp file. Alternatively, at the end of a session, Copilot should clean up all temp files it created.

### Example prompts or workflows

1. I want to optimize disk space afterwards
2. I don't need the space, it can do the job on the principle of coin flips
3. I wish Copilot didn't generate the same information 2x, 3x, 4x...

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by locating Copilot CLI's temporary-file creation and session/task cleanup paths, then trace when generated files become safe to remove. Done means the requested cleanup behavior and its option or session mechanism are implemented with coverage for the relevant lifecycle cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.