Option to force/prepend AGENTS.md to prompt #1391

Closed
opened 2026-02-16 17:30:46 -05:00 by yindo · 6 comments
Owner

Originally created by @dmitriid on GitHub (Aug 20, 2025).

Since models will happily "forget" or ignore any and all instructions (especially when context grows, or when claude compacts the conversation), it's often useful to prompt the model like this:

re-read AGENTS.md

<follow with actual prompt>

It would be a nice (if a very small) quality of life improvement to be able to automatically prepend AGENTS.md to the prompt you send. Could be a shortcut, or an invokable command, or an option.

Originally created by @dmitriid on GitHub (Aug 20, 2025). Since models will happily "forget" or ignore any and all instructions (especially when context grows, or when claude compacts the conversation), it's often useful to prompt the model like this: ``` re-read AGENTS.md <follow with actual prompt> ``` It would be a nice (if a very small) quality of life improvement to be able to automatically prepend AGENTS.md to the prompt you send. Could be a shortcut, or an invokable command, or an option.
yindo closed this issue 2026-02-16 17:30:46 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 20, 2025):

This issue might be related to existing issues that deal with similar challenges around AGENTS.md effectiveness. Please check:

  • #940: Preload instructions after /compact - addresses similar concerns about ensuring instructions remain available when context is cleared
  • #1130: AGENTS.md isn't being respected by copilot - discusses the underlying problem of models ignoring AGENTS.md instructions
  • #1028: Improve AGENTS.md structure for task-specific instructions and reduced context crowding - proposes systematic solutions for instruction adherence

While these issues address related aspects of instruction management, your specific request for a manual option to prepend/force AGENTS.md appears to be unique. Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 20, 2025): This issue might be related to existing issues that deal with similar challenges around AGENTS.md effectiveness. Please check: - #940: Preload instructions after /compact - addresses similar concerns about ensuring instructions remain available when context is cleared - #1130: AGENTS.md isn't being respected by copilot - discusses the underlying problem of models ignoring AGENTS.md instructions - #1028: Improve AGENTS.md structure for task-specific instructions and reduced context crowding - proposes systematic solutions for instruction adherence While these issues address related aspects of instruction management, your specific request for a manual option to prepend/force AGENTS.md appears to be unique. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

couldn't you just do @AGENTS.md? and then it is forced into prompt? (using file reference)

@rekram1-node commented on GitHub (Aug 20, 2025): couldn't you just do @AGENTS.md? and then it is forced into prompt? (using file reference)
Author
Owner

@dmitriid commented on GitHub (Aug 20, 2025):

@rekram1-node somehow my mind just completely blanked out on this :)

@dmitriid commented on GitHub (Aug 20, 2025): @rekram1-node somehow my mind just completely blanked out on this :)
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

Haha no worries, would that suffice for you then? @dmitriid

@rekram1-node commented on GitHub (Aug 20, 2025): Haha no worries, would that suffice for you then? @dmitriid
Author
Owner

@dmitriid commented on GitHub (Aug 20, 2025):

I'll have to try 👍 Worse case, I'll just re-open the issue :)

@dmitriid commented on GitHub (Aug 20, 2025): I'll have to try 👍 Worse case, I'll just re-open the issue :)
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

sounds good, I will close for now then

@rekram1-node commented on GitHub (Aug 20, 2025): sounds good, I will close for now then
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1391