Scope prompt recall and history to the current thread only

Resolved 💬 2 comments Opened Mar 30, 2026 by storyjack Closed May 16, 2026

What variant of Codex are you using?

App (desktop app)

What feature would you like to see?

English

Codex should strictly scope prompt recall and conversation history to the current thread only.

Expected behavior:

  • In thread A, pressing ArrowUp should only recall prompts previously sent in thread A
  • Viewing history in thread A should only show messages from thread A
  • Switching to thread B should only load thread B history
  • There should be no fallback to global cross-thread history

Why this matters:

  • Prevents accidental cross-thread context leakage
  • Matches the user's mental model of thread isolation
  • Makes prompt recall safer and more predictable

Suggested implementation:

  • Require thread_id (or equivalent conversation identifier) for prompt history queries
  • Require thread_id for conversation/message history queries
  • Include thread_id in local cache keys
  • Reset any history index when switching threads

中文

希望 Codex 严格按“当前线程”限制历史输入回看和历史会话访问范围。

期望行为:

  • 在线程 A 中按 ArrowUp,只能回看线程 A 里曾经输入过的内容
  • 在线程 A 中查看历史,只能看到线程 A 的消息
  • 切换到线程 B 后,只加载线程 B 自己的历史
  • 不应回退到全局历史或跨线程历史

为什么重要:

  • 防止不同线程之间的上下文串线
  • 符合用户对线程隔离的直觉预期
  • 提高历史输入回看的可预测性和安全性

建议实现方向:

  • 历史输入查询必须带 thread_id(或等价会话标识)
  • 历史消息查询必须带 thread_id
  • 本地缓存 key 带上 thread_id
  • 切换线程时重置历史索引

Additional information

I searched for related issues and saw some thread/history bugs (for example #16095 and #15494), but this request is specifically about enforcing thread-local history isolation instead of exposing content from other threads.

I am filing this as a feature request because the most reliable fix would be an official product-level change rather than a user-side workaround.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗