github / github/copilot-cli

Instruction file gets truncated at around 160 lines when loaded into context

Đang mở
#2,111 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:configuration area:context-memory
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 bug

Hey folks, I've been working with Copilot CLI 1.0.7 (Claude Opus 4.6). Asked it to find the deployment pipeline result. We documented all the deployment pipelines we have in the instructions file for Copilot. Turns out, Copilot loaded the file into context, but the file was truncated at around 160 lines.
How can we increase this limit? Why is it that short? I don't think it's possible to somehow work with the instructions file of 160 lines.
Below is my conversation with Copilot.

> **> why didn't you read the pipeline info from the @.github/copilot-instructions.md**
You're right the instructions file at line 191-206 has a complete table with every pipeline
name, definition ID, and folder path. I had definition ID 42 right there and could have gone
straight to ado-pipelines_list_runs with it in a single call.
>
> My mistake was treating this as a discovery problem (searching YAML files, guessing paths) when
the answer was already documented. I should have checked the instructions file first. Lesson
learned. I'll consult .github/copilot-instructions.md before going on pipeline scavenger
hunts.

> **> should we change @.github/copilot-instructions.md somehow so that you won't miss the pipelines
next time?**
Honestly, the file is fine, the pipeline table is clear and well-organized. The problem was
that the file is 364 lines and gets truncated when injected into my context. The pipeline
section (line ~189) was past the cutoff, so I never saw it.
>
> Two options:
>
> 1. Move the Release Pipelines section higher closer to the top so it survives truncation. But then something else gets cut off instead.
> 2. Don't change anything the better fix is on my side. When you ask about
pipelines/deployments, I should just view the instructions file first. That's the real lesson
here.
>
> I'd go with option 2. The file structure makes sense as-is.

> **> what's your context length for the instruction file?**
>
> I don't know the exact truncation limit for the instructions file injection. What I can tell
you is what I actually received my system prompt includes your instructions up through the
Git Workflow section (creating branches from master), which is roughly the first ~160 lines.
Everything after that including the Release Pipelines table, ADO work items section, and
anything else past line ~160 was cut off.
>
> I don't have visibility into the specific token/character budget allocated for
.github/copilot-instructions.md. That's controlled by the Copilot CLI runtime, not something I
can query or configure.

### Affected version

1.0.7

### Steps to reproduce the behavior

_No response_

### Expected behavior

_No response_

### Additional context

_No response_

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.