github / github/copilot-cli

Improve ability for sub-agent returned results (summaries) to be read across conversation compactions

Aberta
#2,137 0 comentários 3 reações 0 responsáveis Ver no GitHub
area:agents
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

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

Background sub-agent results are only available in the active conversation context and are permanently lost if conversation compaction occurs before they are used (e.g. integrated into a persistent file or results summary), since read_agent cannot replay results after compaction.

### Proposed solution

Sub-agent results should either be re-readable at any time (persisted server-side and re-fetchable via read_agent regardless of compaction state - or possibly saved as a temp file on the local machine with a pointer which can still be accessed post-compaction), or the system should warn the user that unintegrated agent results are at risk before compaction occurs.

### Example prompts or workflows

I have a large multi-page schematic PDF called example_schematic.pdf in my current directory. Please do the following:

1. Use pdftoppm -r 150 -png example_schematic.pdf [page] to convert it to per-page PNG images in a folder named images_from_example_schematic_PDF/.
2. For each page image, create a todo and launch background sub-agents (fleet mode) — **10 or more agents simultaneously** — each tasked with analyzing one page image and returning a structured summary
(ICs, pins, signals, passives, DNI parts).
3. Do not integrate any results into a file yet. Simply collect all agent results via read_agent into your conversation context first.
4. After all agents have completed and you have read all results, then attempt to write everything into a description.txt summary file.

The goal is to observe whether sub-agent results read into conversation context early in the session are still accessible and complete by the time the controller agent _("orchestrator")_ attempts to utilize them to build the combined description.txt — specifically across any automatic conversation compaction that may occur between steps 3 and 4.

[this prompt was authored by CoPilot and intended to force the issue. Issue occurs sporadically even with limits to 2 fleet agents.]
It may help to force an older model with smaller context, such as GPT-4.1.

### Additional context

When a background sub-agent completes and its result is read via read_agent, the result exists only in the active conversation context. If a conversation compaction occurs before the result is integrated into a persistent file, the detailed sub-agent output is permanently lost and cannot be re-retrieved — read_agent on an already-completed agent does not replay the result after compaction.

**_CoPilot_**: "Sub-agent results come back through the API — they are injected directly into my conversation context when I call read_agent. They are not written to a file automatically."

What this means for compaction:

- "If I call read_agent and the result lands in my conversation context, then a compaction happens, the compaction summarizer may or may not preserve the full detail of the agent's response (it tends to
summarize/truncate)."
- "Once compacted, that detailed sub-agent output is gone — I cannot re-read it from a completed agent. read_agent on an already-read, completed agent may return nothing new."

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.