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
Every backend's prompt-history store — the audit log of what the user typed — is parsed with kind="history" (and role="user"). Because search and grep default to --type prompts, the dedicated prompt-history log is excluded from the default search; it only surfaces under --type history or --type all.
Typed prompts still appear in a default search via the conversation transcripts' user turns, so nothing is unreachable — but a bare agentgrep search <term> --agent <backend> does not return the purpose-built prompt-history store. This is a shared convention, not a single-backend bug: Grok's prompt_history.jsonl and Cursor CLI's prompt_history.json (#27) behave identically.
Mechanism
The role→kind default would map role="user" → kind="prompt":
--type prompts (the default) = 893, all from transcript user-turns — prompt_history.json is not among them. --type history (8638) includes it; --type all = 9531. (Counts from a real local store; file paths and prompt text omitted.)
Options (no code change proposed here)
Keep as-is, document it. Prompt-history files are audit logs; kind="history" is defensible, and transcripts already answer the default prompt search. Document that the dedicated prompt-history store needs --type all/history.
Reclassify prompt-history → kind="prompt" so a bare --agent <backend> search returns the typed-prompt log. Repo-wide — affects Grok (shipped) and Cursor CLI (Split Cursor into cursor-cli and cursor-ide, add missing stores #27) — so it would be a cross-backend behavior change warranting a ### Breaking changes CHANGES note.
This issue documents the behavior only; it does not change code.
Summary
Every backend's prompt-history store — the audit log of what the user typed — is parsed with
kind="history"(androle="user"). Becausesearchandgrepdefault to--type prompts, the dedicated prompt-history log is excluded from the default search; it only surfaces under--type historyor--type all.Typed prompts still appear in a default search via the conversation transcripts' user turns, so nothing is unreachable — but a bare
agentgrep search <term> --agent <backend>does not return the purpose-built prompt-history store. This is a shared convention, not a single-backend bug: Grok'sprompt_history.jsonland Cursor CLI'sprompt_history.json(#27) behave identically.Mechanism
The role→kind default would map
role="user"→kind="prompt":USER_ROLES: https://github.com/tony/agentgrep/blob/v0.1.0a10/src/agentgrep/__init__.py#L101build_search_record: https://github.com/tony/agentgrep/blob/v0.1.0a10/src/agentgrep/__init__.py#L5632-L5648…but the prompt-history parsers set
kind="history"explicitly, overriding it even though each entry is a user prompt (role="user"):parse_grok_prompt_history: https://github.com/tony/agentgrep/blob/v0.1.0a10/src/agentgrep/__init__.py#L4510-L4536parse_cursor_prompt_history(Split Cursor into cursor-cli and cursor-ide, add missing stores #27; on the unmerged branch, so linked by branch ref rather than a tag): https://github.com/tony/agentgrep/blob/cursor-split-cli-ide/src/agentgrep/__init__.py#L5197-L5231The
--type promptsgate then drops any record whosekind != "prompt":…and the default
--typeisprompts:Reproduction
finddiscovers the prompt-history store (Cursor CLI shown; Grok is the same):But its records parse as
history/user(so do Grok's):So the same query returns the prompt-history log only under
history/all:--type prompts(the default) = 893, all from transcript user-turns —prompt_history.jsonis not among them.--type history(8638) includes it;--type all= 9531. (Counts from a real local store; file paths and prompt text omitted.)Options (no code change proposed here)
kind="history"is defensible, and transcripts already answer the default prompt search. Document that the dedicated prompt-history store needs--type all/history.kind="prompt"so a bare--agent <backend>search returns the typed-prompt log. Repo-wide — affects Grok (shipped) and Cursor CLI (Split Cursor into cursor-cli and cursor-ide, add missing stores #27) — so it would be a cross-backend behavior change warranting a### Breaking changesCHANGES note.This issue documents the behavior only; it does not change code.