Skip to content

Custom instructions are truncated at startup #567

@kenakofer

Description

@kenakofer

Describe the bug

Whether using AGENTS.md or .github/copilot-instructions.md, only about 15 lines of the markdown is provided to copilot CLI at startup, cutting it off in the middle of a line. As a workaround, my first instruction can be for it to read AGENTS.md, after which it will be be properly informed.

Affected version

0.0.354 and 0.0.358 at least

Steps to reproduce the behavior

Create an AGENTS.md file like:

Please begin by reading and acknowledging .\AGENTS.md and any other instruction filepaths you've been provided.

XYZ Developer Guide for AI Agents

This guide documents the testing, building, and coverage analysis workflows for XYZ2 library, specifically tailored for AI assistants working on this codebase.

Building and Testing

Running Specific Tests

Our build system uses the clap.py command. Note that you don't need to directly call .\clap.py, as clappy.bat will do that for you if you're at the root of the xyz2 repo.

clappy.bat build test_<module_name>

...where <module_name> is replaced with everything after xyz2_ in the test file name.

Running All Tests (Formal Build)

To run the complete test suite and generate coverage reports:

clappy.bat build formal

[file continues]

Then start it with copilot (no options needed), and ask it to "Run all the tests". It has no idea about formal. It will tell me exactly where its instructions were cut off:

What advice were you given regarding clappy.bat?

● According to the AGENTS.md file, I was instructed to use the clappy.bat command for
building and testing. Specifically:

Key points:

 - The build system uses the clappy.bat command, which is available on the PATH
 - I don't need to directly call .\clap.py - the clappy.bat will do that automatically if I'm at the root of the repo
 - For running specific tests, the example shown is: clappy.bat build test_<test_name>

However, I notice the AGENTS.md instruction appears to be cut off mid-sentence.
I used clappy.bat build test which may not have been the correct command. Based
on the pattern, I should likely specify a test name or use a different target.

Would you like me to try a different clappy command, or should I first build the
test executables?

What is the mid sentence cutoff?

● Looking back at my system instructions, the AGENTS.md content shows this cutoff:

 clappy.bat build test_

The sentence/code example ends with test_ and appears incomplete - it looks like
it was going to show an example of running a specific test with a test name
after the underscore, but the text cuts off there.

Let me view the actual AGENTS.md file to see the complete instruction:

✓ Read AGENTS.md (198 lines)

● Ah, I see now! The complete instruction is:

 clappy.bat build test_<module_name>

...where <module_name> is replaced with everything after xyz2_ in the test file
name.

So when I ran clappy.bat build test, I was missing the module name. To run all
tests with coverage, I should have used:

 clappy.bat build formal

That's the command that runs the complete test suite and generates coverage
reports. Would you like me to run that now?

Expected behavior

It should read the whole file on startup.

Additional context

Windows, launched from powershell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions