codex - 💡(How to fix) Fix feat: support prompt-aware startup context for memory hooks

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

SessionStart is the natural hook for loading memory, but its input is prompt-blind. It has cwd, source, session_id, model, and permission mode, but no user prompt.

UserPromptSubmit does include prompt and can return additionalContext, but it runs on every turn and has no first-turn matcher. Memory plugins that want prompt-specific startup recall must implement their own first-turn state.

Evidence

Current docs/schemas show:

  • SessionStart supports additionalContext, but has no prompt.
  • UserPromptSubmit has prompt and supports additionalContext.

Related but different: #19385 covers PreToolUse.additionalContext; #21696 covers hiding hook context from the TUI.

Expected fix

Add a supported first-prompt memory path. For example:

  • include an optional prompt in SessionStart when startup is triggered by the first user prompt, or
  • add is_first_prompt / turn_index / first-turn matcher support to UserPromptSubmit.

Goal: memory plugins can inject small prompt-specific startup context once, without broad stale SessionStart recall or recurring every-turn recall.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING