github / github/copilot-cli

Expose large_output_file_path on TaskShellProgress so clients can read complete shell-task output

オープン 初心者向け
#4,630 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:tools
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Describe the feature or problem you'd like to solve

TaskShellProgress.recentOutput is a small rolling window (~10 lines / ~80 chars). A client polling it to display a running shell task shows a lossy sample presented as the tail. Measured at 2s polling against a 10 lines/sec producer — consecutive polls are disjoint, so ~half the output is unobservable:

poll lines first last
1 10 3 12
2 10 21 30
3 10 39 48
7 10 113 122

A complete log already exists. With largeOutput enabled the runtime writes a full, gap-free file — including for attached tasks (400 lines → bytes=3492 first=1 last=400 contiguous=true). The runtime knows the path: shell_attached_session_read returns recent_output, large_output_file_path, large_output_total_bytes.

The wire contract drops the last two, so clients cannot find the file.

Proposed solution

In schemas/api.schema.json, add to TaskShellProgress:

"largeOutputFilePath":  { "type": "string" },
"largeOutputTotalBytes": { "type": "integer" }

Optional, populated only when largeOutput is enabled and the threshold has been crossed — no change for existing consumers.

This must happen in the CLI: TaskShellProgress is defined here and the SDK's rpc.d.ts is generated from this schema (AUTO-GENERATED FILE - DO NOT EDIT / Generated from: api.schema.json). The definition also sets "additionalProperties": false, so the field is actively forbidden on the wire — no client-side or SDK-side change can surface it.

Example prompts or workflows

A GUI host showing live build output for a long-running shell task. Today it must poll recentOutput and stitch samples, knowingly dropping content.

Clients cannot work around this: largeOutput is session-scoped (fixed at createSession; no per-message option, no mid-session config update), so a directory-per-task mapping isn't possible. Concurrent tasks do get separate files, but creation order does not follow task order — tasks listed 1,0 produced files in reverse — so ctime correlation is unsafe. That leaves content-matching heuristics, which are genuinely ambiguous while two tasks emit identical output.

Additional context
  • Still absent in 1.0.11: TaskShellProgress unchanged (3 fields), largeOutput appears 0 times in rpc.d.ts, while rpc.d.ts grew ~109KB with other features — looks unaddressed rather than deliberate.
  • The file is written incrementally (one tracked its task from t=23s to t=44s), so exposing the path enables a real live tail.
  • It appears only after the size threshold is crossed (~17s in one probe); brief absence is expected and easy to handle.
  • TaskShellInfo.logPath doesn't cover this — documented as detached-only, whereas large_output_file_path is on the attached read path.
  • Related but distinct: #2984 (session-state trace logging for replay/forensics — different consumer and timing; neither request satisfies the other). The largeOutput issues on copilot-sdk (#1788, #2158, #2161) concern the config not being honored; here it was honored.

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

schemas/api.schema.json の TaskShellProgress 定義から始め、次に、そのスキーマから生成されるものとして示されている rpc.d.ts の生成経路を調べます。オプションのフィールドがどのように表現されているかを確認し、関連する CLI スキーマまたは API バリデーションのテストを確認します。既存の consumer を壊すことなく、利用可能な場合に attached-task の進捗で大きな出力のパスと合計バイト数を公開できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
api, cli
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

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

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