You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(engine): load a workspace AGENTS.md into the session instructions
A repository had no way to state its conventions once: the user repeated
them in the first message of every session, and nothing in the workspace
told the agent how to work there.
A session that starts in a directory with an AGENTS.md at its root now
reads the file into its system instructions, after the environment and
before the user profile. The text follows a short note saying it is
guidance from the workspace rather than a message from the user, that it
cannot grant a permission or approve an action, and that the current
request takes precedence, so a repository file never outranks the trust
rules. The file is read once, when the session is created, because those
instructions are reused for every request in the session: an edit reaches
the next session, and the agent can read the file again with read_file.
The load is bounded and stays inside the workspace: at most 64 KiB, cut
at a character boundary and marked when the file is longer, and a link
that resolves outside the workspace, a directory, an empty file or a file
that is not text is skipped. Sessions in IM channels run in the default
workspace and load the file there.
Unit tests cover reading, the boundary cases and the rendered section,
and one checks that the section lands between the environment and the
user profile. README, README_cn and the changelog describe the behavior.
Co-Authored-By: Anda Bot <noreply@anda.bot>