[PR #3159] fix: Update summarize prompt to preserve agent rules and constraints #10553

Closed
opened 2026-02-16 18:15:14 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3159

State: closed
Merged: No


I work with Kubernetes and FluxCD (GitOps) and maintain an AGENTS.md file with a clear rule prohibiting any git push actions or execution of the terraform apply command. However, after several rounds of conversation summarization, the contract that enforces these permissions is lost, and the model/agent goes out of control, executing prohibited commands, which can be disastrous.

In my opinion, adjusting this through permissions alone would not be an effective solution; the root cause lies in the loss of context.

To mitigate this, the following two additional rules in the summary prompt could help keep the conversation aligned and reinforce the established contract:

- Preserve custom rules from AGENTS.md
- Maintain agent-specific constraints
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3159 **State:** closed **Merged:** No --- I work with Kubernetes and FluxCD (GitOps) and maintain an `AGENTS.md` file with a clear rule prohibiting any `git push` actions or execution of the `terraform apply` command. However, after several rounds of conversation summarization, the contract that enforces these permissions is lost, and the model/agent goes out of control, executing prohibited commands, which can be disastrous. In my opinion, adjusting this through permissions alone would not be an effective solution; the root cause lies in the loss of context. To mitigate this, the following two additional rules in the summary prompt could help keep the conversation aligned and reinforce the established contract: ``` - Preserve custom rules from AGENTS.md - Maintain agent-specific constraints ```
yindo added the pull-request label 2026-02-16 18:15:14 -05:00
yindo closed this issue 2026-02-16 18:15:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10553