연결됨 다시 연결 중 다시 연결 초 연결 실패 연결 일시 중지 복구 실패
How I stopped making agents reread the same prompts · Cover image

How I stopped making agents reread the same prompts

Public posts

Why Slogs checks its MCP prompt version at the start of each session, and how the sync rules work.

Session-start prompt version sync

The Agent policy prompt tends to get long. At first, it needs to include installation instructions, MCP connection methods, memory retrieval rules, storage rules, and exception scenarios—so it seems natural. The problem is that when this prompt enters a permanent guideline like global AGENTS.md, it consumes tokens for every session.

Slogs MCP The prompt also encountered the same issue. While the functionality remains, the global Agent policy needs to be much smaller. Therefore, Slogs changed it from “reading all prompts every time” to “only checking the version when the session starts”.

The goal is compression, not the removal of features.

Don’t delete policies just because the prompt is made more compact. What needs to be reduced are redundant explanations, while what must be retained is the operation contract.

Slogs MCP The key agreements that must be maintained in the prompt are as follows.

  • During initial installation, the MCP key is required again.
  • Select Scope of Application for Deployment/Project/Current Session
  • Do not record tokens in documents, logs, or LLM Wiki
  • The previous decision/preference/project context follows the rule of first querying LLM Wiki
  • Rules for finding and merging/updating related memories before saving
  • Rule for specifying categoryPath
  • Prompt version synchronization rule

The compact version simply condenses this agreement, but it doesn’t reduce its features.

At the start of the session, only the one-line version is checked.

The key is the slogs-mcp.version endpoint.

When the session starts, the Agent or synchronization script first reads only a single line of version text from the following URL.

https://slogs.dev/prompts/slogs-mcp.version

Then, it is compared with the version of the SLOGS_MCP_PROMPT management block installed in the local configuration file.

  • If the version is the same, I won’t read the entire prompt.
  • Do not rewrite the file again.
  • Does not repeat key requests.
  • The scope of application question is also not repeated.

With this one rule, the initial cost of a session becomes much lower. In most sessions, just checking the version line and proceeding with the existing policy is sufficient.

Only when the version differs, read the entire Markdown.

Only when the server version and local version differ, or when the local block has no version, will the entire prompt be read.

https://slogs.dev/prompts/slogs-mcp.ko.md

After reading, replace the existing SLOGS_MCP_PROMPT management block at the same location. Blocks installed globally are updated according to global guidelines, and those installed in projects are updated according to project guidelines.

The key point is not cumulative additions, but replacement. If the same policy is applied multiple times, it becomes difficult for the agent to determine which sentence should be given priority. There should be only one management block.

This is not a scheduler.

At first, due to the name SlogsMcpPromptSync, it might seem like a periodic schedule. However, the intention is not a background schedule.

Slogs's current policy is clear.

  • It is not registered as a recurring task in Windows Scheduled Task.
  • It does not auto-update at regular intervals.
  • It synchronizes only when the version differs at the start of the session.
  • If the version is the same, the entire prompt is not fetched.

The agent policy should be up to date at the moment when the user starts the task. Changing the instruction file secretly in the background makes debugging difficult, and the policy can change when the user is not looking.

Why hash and management blocks are needed

Slogs management block places the URL, version, sha256, and updated value in the header. While only the version alone is sufficient for synchronization determination, the hash helps verify whether the actual content matches expectations.

The purpose of the management block is not for decorative purposes for people to read. It is a structure so that the Agent and script can clearly understand the following.

  • This block is managed by Slogs and MCP prompts.
  • What is the currently installed version?
  • What is the URL to compare with the server?
  • When a new version comes out, just replace this block.

The agent policy should be as short as possible, but not ambiguous.

A common mistake when reducing a prompt is cutting out exception rules. However, in real operations, most of the importance lies in exceptions.

  • MCP When the tool is not visible, try tool search first.
  • Without tools, you don’t say you used memory.
  • If tokens need to be used in plain-text settings, inform the user first.
  • Sensitive information is not stored in LLM Wiki.
  • Memory storage prioritizes merge/update over remember.

The compact prompt should preserve these rules while reducing the description. If the length is shorter but the Agent’s behavior changes, it is a failed compression.

0 Comments

Comments: 0

Sign in to leave a comment.

No comments yet. Write the first one.

The server connection was interrupted. Reconnect ×