github / github/copilot-cli

Feature Request: First-class support for ephemeral / workspace-independent tasks

オープン
#1,618 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
area:permissions area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

# Feature Request: First-class support for ephemeral / workspace-independent tasks

## Problem

Copilot CLI and VS Code Copilot Chat assume most work is tied to a specific directory or workspace. But many tasks are inherently ephemeral and workspace-independent:

- **One-off scripting**: "Write a launchd plist that kills Apple Music and opens Spotify instead. Publish it as a gist."
- **Cross-repo research**: "Open the PR Ada pinged me about — it's in the vscode repo, something about a new feature."
- **Multi-repo synthesis**: "Update the release notes based on work across several repos this past week."
- **Prototype-and-discard**: "Create a standalone HTML/CSS/JS mockup, screenshot it with Playwright, and file a GitHub issue with the images."
- **Non-code questions**: "What meetings do I have today?"
- **Cross-repo triage**: "Here's a stacktrace — figure out which vscode repo the bug is in, clone it, use git-blame to find the right owner (not just whoever last ran a linter), and assign the issue."
- 🪩 **Meta-tasks**: "Help me draft and file a feature request for Copilot CLI itself." (This very session is running from an unrelated repo because there's no better place to launch it.)

These tasks don't belong to any workspace. The user doesn't care about the working directory before, during, or after. But today, launching `copilot` from an arbitrary directory triggers a trust prompt for that directory — even though the task has nothing to do with it. The concept of "workspace trust" is meaningless for these sessions.

## Impact

Without first-class support, the friction of the trust prompt (and the conceptual mismatch of "trusting" an irrelevant directory) discourages using Copilot CLI for exactly the kind of quick, high-leverage tasks where an AI assistant shines most — the ad-hoc stuff you'd previously Google, StackOverflow, or cobble together in a throwaway terminal.

This applies equally to VS Code Copilot Chat when opened without a workspace/folder. The same class of ephemeral tasks arises there too.

## Desired behavior

When a session has no meaningful workspace context, the tool should gracefully handle that — no trust prompts for irrelevant directories, no assumption that the user cares about persisting the working directory, and ideally the ability to create and discard scratch files without ceremony.

There's also a related but distinct scenario: tasks that *do* involve codebases, but the user doesn't know *which ones* up front. Cross-repo triage, multi-repo release notes, stack trace investigation — these start workspace-less and need to *discover* the right repos as part of the task. Today there's no good place to launch these from either, and no way for Copilot to dynamically pull in repo context mid-session (e.g. cloning repos it determines are relevant). A user might have a custom skill that documents their commonly-accessed repos and auth methods (GH EMU, ADO, public), but the underlying session model still assumes a fixed workspace from the start.

The exact UX is up to the team, but the core insight is: **not every Copilot session is about a codebase, and even when it is, the right codebase may not be known at launch time**.

## Current workaround

I shimmed the `copilot` command in my shell profile to support a `--transient` flag that creates a timestamped scratch directory and runs copilot from there:

```bash
copilot() {
local args=()
local transient=false
for arg in "$@"; do
if [[ "$arg" == "--transient" ]]; then
transient=true
else
args+=("$arg")
fi
done
if $transient; then
local session_dir=~/copilot-transient-sessions/$(date +%Y%m%d-%H%M%S)
mkdir -p "$session_dir"
echo "Transient session: $session_dir"
(cd "$session_dir" && command copilot "${args[@]}")
else
command copilot "$@"
fi
}
```

I then auto-trust the parent directory in `~/.copilot/config.json`:

```json
{
"trusted_folders": [
"/Users/me/copilot-transient-sessions"
]
}
```

This works but it's duct tape. The tool itself should understand that not every session needs a workspace.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。