Option to not inject "Recent User Prompts" into the startup context (session-start / post-compaction)

Open Beginner friendly
#2,515 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go, shell

Research direction

Start with session-start.sh and post-compaction.sh to see how each script requests /context. The issue proposes a configuration option that both scripts translate into prompts=-1; the endpoint behavior is covered in internal/store/store_test.go. Done when the option works in both scripts without editing them and disables the Recent User Prompts section.

Written by the indexing model from the issue text.

Description

status:needs-review

Problem. The Claude Code scripts (session-start.sh and post-compaction.sh) request /context, and the result includes the project's "Recent User Prompts". With several sessions or several agents in the same project, a session receives as context the messages that the user and other agents wrote in other sessions, including confirmations such as "yes" or "go ahead", without knowing where they come from. An agent may take them as an instruction or a permission from the user of the current session. That is an injection risk from foreign content and a risk of misreading authorizations.

What already exists. /context?prompts=-1 omits the section (covered in internal/store/store_test.go, "negative Prompts omits the section and its header"), but the scripts offer no way to enable it without editing them, and a plugin update overwrites the edit.

Proposal. A configuration option (for example ENGRAM_CONTEXT_PROMPTS=0, or a field in the plugin config) that both scripts read and translate into prompts=-1. Even better: by default, do not include prompts from other sessions in that section, or label them with their session and author. Today we work around it with a local patch reapplied after every update; an official option would remove the need for it.

Versions: plugin 0.1.22 and 0.1.23, engram 3.7.2.

Dominant language
Go
Stars
7.1k
Forks
729
Avg merge
1h 35m
Merged PRs (30d)
154

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Gentleman-Programming/engram

All issues in Gentleman-Programming/engram

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.