Skip to content

memories: exclude AGENTS and skills from stage1 input#14268

Merged
andi-oai merged 2 commits intomainfrom
codex/memories-drop-contextual-agents
Mar 16, 2026
Merged

memories: exclude AGENTS and skills from stage1 input#14268
andi-oai merged 2 commits intomainfrom
codex/memories-drop-contextual-agents

Conversation

@andi-oai
Copy link
Copy Markdown
Contributor

@andi-oai andi-oai commented Mar 10, 2026

Why/Context/Summary
  • Exclude injected AGENTS.md instructions and standalone skill payloads from memory stage 1 inputs so memory generation focuses on conversation content instead of prompt scaffolding.
  • Strip only the AGENTS fragment from mixed contextual user messages during stage-1 serialization, which preserves environment context in the same message.
  • Keep subagent notifications in the memory input, and add focused unit coverage for the fragment classifier, rollout policy, and stage-1 serialization path.
Test plan
  • just fmt
  • cargo test -p codex-core --lib contextual_user_message
  • cargo test -p codex-core --lib rollout::policy
  • cargo test -p codex-core --lib memories::phase1

@andi-oai andi-oai added the oai PRs contributed by OpenAI employees label Mar 10, 2026
@andi-oai andi-oai force-pushed the codex/memories-drop-contextual-agents branch from 77e08fa to 2a2e3e5 Compare March 10, 2026 23:11
Comment thread codex-rs/core/src/contextual_user_message.rs Outdated
Comment thread codex-rs/core/src/memories/phase1.rs Outdated
Comment thread codex-rs/core/src/memories/phase1.rs
Comment thread codex-rs/core/src/rollout/policy.rs Outdated
Comment thread codex-rs/core/src/contextual_user_message.rs
@andi-oai andi-oai force-pushed the codex/memories-drop-contextual-agents branch from 2a2e3e5 to 8c63b48 Compare March 11, 2026 17:47
@andi-oai andi-oai force-pushed the codex/memories-drop-contextual-agents branch 3 times, most recently from 7fcdd84 to 8e397dc Compare March 11, 2026 22:30
Comment thread codex-rs/core/src/memories/phase1.rs Outdated
@andi-oai andi-oai force-pushed the codex/memories-drop-contextual-agents branch from 8e397dc to 50efaba Compare March 13, 2026 19:33
@andi-oai andi-oai force-pushed the codex/memories-drop-contextual-agents branch from 50efaba to 8f94823 Compare March 13, 2026 19:47
@andi-oai andi-oai enabled auto-merge (squash) March 16, 2026 19:04
@andi-oai andi-oai merged commit 4c9dbc1 into main Mar 16, 2026
32 checks passed
@andi-oai andi-oai deleted the codex/memories-drop-contextual-agents branch March 16, 2026 19:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants