github / github/copilot-cli

Subagent transcripts are inlined verbatim and uncapped into the parent session export

Đang mở
#3,944 2 bình luận 0 reaction 1 người được giao Được @MRayermannMSFT nhận Xem trên GitHub
area:agents area:sessions
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

When a session uses subagents, the parent's exported transcript inlines the **complete** transcript of every subagent verbatim, with no summarization and no size bound. Each subagent's full tool-call output is embedded into the parent, and a subagent that runs more than once (e.g. a retried phase) has its full transcript embedded again on each run.

Concretely, a single exported session from a multi-lane review flow came out to ~3.2 MB / ~58k lines: roughly 66% of it was inlined subagent transcripts, and a phase that ran three times added another ~30% because each run's full transcript was inlined again. There's currently no way to make the export summarize or externalize subagent transcripts — the parent always embeds the full child log.

## Proposed solution

Add a way to keep the parent export bounded when subagents are involved. Any one of these would help:

- Summarize each subagent in the parent export (final message + tool-call count + key results) instead of inlining its full log.
- Externalize each subagent transcript to its own artifact and reference it from the parent, so full detail is preserved but not inlined.
- A flag/setting to choose inline vs. summarized vs. externalized export.

Full detail stays recoverable; the parent transcript stops growing unbounded with each subagent and each retry.

## Example prompts or workflows

- A multi-subagent run (e.g. several parallel analysis/review lanes): today the parent inlines every lane's entire transcript; a summary plus per-lane artifacts would keep the parent readable.
- Re-running an expensive sub-step several times in one session: today each run's full transcript is re-inlined, multiplying size; a summarized/externalized export records each run compactly.
- Long sessions in general: a bounded parent transcript stays reviewable, where a fully-inlined one becomes unmanageable.

## Additional context

- Affected version: `copilot` 1.0.65 (Homebrew cask).
- The behavior appears to come from the export renderer that joins each subagent's timeline entries and embeds the full tool-call output for every entry, with no truncation or summarization branch in that path.
- OS: macOS (ARM).

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.