Problems with the AGENTS.md file

I have reproduced the issue on the latest CLI version.

Yes, I am on the latest version

I have searched existing posts and this report is not a duplicate.

Yes, this isnโ€™t a duplicate

In which of these areas are you experiencing a problem?

Theme

Expected behavior

The AGENTS.md file should be ignored when running shopify theme dev or `shopify theme push` command.

Actual behavior

Now, the AGENTS.md file is being uploaded along with the theme files and is generating the following error: Failed to upload file "AGENTS.md" to remote theme. Theme file 'AGENTS.md' is invalid.

Reproduction steps

In any project where you have Shopify theme files, add an AGENTS.md file and run the command shopify theme [dev|push]

Verbose output

โ•ญโ”€ error โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                                                           โ”‚
โ”‚  Failed to upload file "AGENTS.md" to remote theme.                                                                                       โ”‚
โ”‚                                                                                                                                           โ”‚
โ”‚  Theme file 'AGENTS.md' is invalid.                                                                                                       โ”‚
โ”‚                                                                                                                                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Operating system

MacOS Tahoe 26.2.2

CLI version

4.8.1

Shell

zsh

Nodejs version

26.9.0

Hi @Ubaldo_R , I am trying to replicate this. I am running the latest version of the CLI (I ran theme ini to get a new skeleton theme with the AGENTS.md file. I am able to push the theme to my shop and I see the file.

Could you tell me a bit more about your setup? Is the AGENTS.md file in the root of the theme? Is there anything different about your file? I will also DM you in case you would be able to send more info or even the file so I can try and find the cause.

Hi @Josh-Shopify

Yes, the AGENTS.md file is in the root directory of my theme.

I see the error when I use the shopify theme dev or shopify theme push command.

We were able to replicate the issue. I am not sure an exact timeline of the fix. In the interim, the quickest way forward is to remove or rename the AGENTS.md file before running theme dev or push.

Weโ€™ll update with any changes!

Thanks again for flagging this.

A fix is on the way.

Another option for now is to add the AGENTS.md to the .shopifyignore file.

A fix has been deployed. Upgrading the Shopify CLI version to 4.8.2 should solve this. Thank you again for your report @Ubaldo_R

Thank you very much! By the way, where can I find documentation on this? @Josh-Shopify

You could find some quick info in the pull request I made here [4.8] Fix `shopify theme pull/push/package` sync by EvilGenius13 ยท Pull Request #8630 ยท Shopify/cli ยท GitHub. Essentially we reverted an earlier pull request and pushed it as a new patch.