codex - 💡(How to fix) Fix Proposal: repo-scoped experience compiler hooks for memory, evals, briefs, and skills [4 comments, 3 participants]

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…
GitHub stats
openai/codex#20985Fetched 2026-05-05 05:54:55
View on GitHub
Comments
4
Participants
3
Timeline
13
Reactions
0
Timeline (top)
labeled ×5commented ×4closed ×1mentioned ×1

Root Cause

Codex sessions generate high-value experience:

  • what the user asked
  • what the agent tried
  • what failed
  • what the human corrected
  • which files were involved
  • which tests or checks proved the fix
  • what future agents should avoid

Today much of that disappears into chat history, compaction summaries, or broad memory. Repo-scoped, inspectable compiled memory would reduce repeated mistakes and repeated context explanation, especially for users who work across many repositories.

This also overlaps with existing memory discussions, especially scoped/project memory. The distinction I want to highlight is that the useful unit is often not a single memory note, but a compiled work episode: task → attempts → correction → verification → reusable lesson/eval.

Code Example

Relevant repo memory:
1. Similar checkout timeout issue was caused by token refresh, not retry count.
2. paymentClient.ts has hidden coupling with auth/session.ts.
3. Always run npm run test:payments after touching checkout.
4. Avoid changing global timeout constants; that caused flaky CI twice.
RAW_BUFFERClick to expand / collapse

Proposal

I built an OSS companion tool called WorkGraph:

https://github.com/ranausmanai/agent-workgraph

WorkGraph watches local Codex and Claude coding sessions and compiles them into repo-scoped engineering intelligence:

  • project journey / milestones
  • learned repo rules
  • known traps and repeated failure patterns
  • eval/check candidates
  • reusable skills and task patterns
  • future-agent briefs
  • AGENTS.md-style instruction suggestions
  • a local UI for inspecting the compiled work graph

This is related to memory, but the focus is not raw memory storage. The focus is experience compilation: turning human-agent work into durable, inspectable repo intelligence that future agent sessions can reuse.

Why this matters

Codex sessions generate high-value experience:

  • what the user asked
  • what the agent tried
  • what failed
  • what the human corrected
  • which files were involved
  • which tests or checks proved the fix
  • what future agents should avoid

Today much of that disappears into chat history, compaction summaries, or broad memory. Repo-scoped, inspectable compiled memory would reduce repeated mistakes and repeated context explanation, especially for users who work across many repositories.

This also overlaps with existing memory discussions, especially scoped/project memory. The distinction I want to highlight is that the useful unit is often not a single memory note, but a compiled work episode: task → attempts → correction → verification → reusable lesson/eval.

Current reference implementation

WorkGraph is currently an external local-first tool. It works by reading local session artifacts and writing repo-local outputs under .workgraph/.

Current surfaces include:

  • CLI: workgraph start, workgraph stop, workgraph brief, workgraph reuse
  • Codex skill install: users can ask Codex to start WorkGraph from inside a session
  • Claude Code slash command install: /workgraph
  • local web UI at http://127.0.0.1:8787
  • repo artifacts such as journey.md, workgraph.md, known_traps.md, generated_evals.jsonl, repo_rules.md, agent_instructions.md, and task_templates.md
  • cross-project reusable skills stored under ~/.workgraph/skills/
  • local default compiler, with optional model-backed providers only when explicitly enabled

The goal is not to make Codex depend on WorkGraph. The goal is to explore whether Codex should expose a clean interface so external tools can safely interoperate with Codex around repo-scoped memory and experience compilation.

Requested Codex integration points

I am not opening a PR because the contributing guide says external PRs are invitation-only.

Instead, I would like feedback on whether Codex would consider lightweight extension points for external experience compilers, such as:

  1. A documented local session transcript/event export path
  2. A lifecycle hook after session turns, stop, or compaction
  3. A project-scoped startup brief file that Codex can choose to read
  4. A way for external tools to provide a relevant repo brief before a new session starts
  5. A documented schema for repo memory / eval / trap / skill artifacts
  6. Optional controls for users to inspect, disable, or clear repo-scoped compiled memory

Example output

For a future task, WorkGraph can produce a brief like:

Relevant repo memory:
1. Similar checkout timeout issue was caused by token refresh, not retry count.
2. paymentClient.ts has hidden coupling with auth/session.ts.
3. Always run npm run test:payments after touching checkout.
4. Avoid changing global timeout constants; that caused flaky CI twice.

Related issues

This seems related to long-term and scoped memory discussions, but may be a slightly different surface area because it focuses on compiled session experience and repo-local artifacts rather than only memory storage.

If this direction aligns with the Codex roadmap, I am happy to provide implementation notes, failure cases, schema examples, or a narrower design proposal.

extent analysis

TL;DR

Consider implementing lightweight extension points in Codex for external experience compilers, such as a documented local session transcript export path and lifecycle hooks.

Guidance

  • Review the requested Codex integration points, such as a documented local session transcript/event export path and lifecycle hooks, to determine their feasibility and potential impact on Codex.
  • Evaluate the potential benefits of exposing a clean interface for external tools to interoperate with Codex around repo-scoped memory and experience compilation.
  • Investigate the possibility of creating a project-scoped startup brief file that Codex can choose to read, and a way for external tools to provide a relevant repo brief before a new session starts.
  • Consider the importance of a documented schema for repo memory / eval / trap / skill artifacts and optional controls for users to inspect, disable, or clear repo-scoped compiled memory.

Example

No code example is provided as it is not clearly supported by the issue.

Notes

The implementation of these extension points may require significant changes to Codex and should be carefully considered to ensure they align with the Codex roadmap.

Recommendation

Apply a workaround by implementing a subset of the requested integration points, such as the documented local session transcript export path, to test the feasibility and potential benefits of the proposed solution.

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