Option to not inject "Recent User Prompts" into the startup context (session-start / post-compaction)
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
- Domain
- ai-infra-agents
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
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
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gentleman-Programming/engram
-
status:needs-review type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Gentleman-Programming/engram#2512 ·
Maintainers usually reply within 1 day
-
status:needs-review
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Gentleman-Programming/engram#2502 ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Gentleman-Programming/engram#2501 ·
Maintainers usually reply within 1 day
-
status:needs-review type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Gentleman-Programming/engram#2416 ·
Maintainers usually reply within 1 day
-
feat(claude): explicit cross-project memory saves from a Claude Code session (parity with Pi #1591)Openstatus:needs-review type:feature
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Gentleman-Programming/engram#2514 ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#27233 ·
Maintainers usually reply within 1 day
-
area/tests needs-triage theme/ci-dx
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
kubescape/kubescape#6095 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
oras-project/oras-go#1853 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100