Overview
Keep research context in a local folder of notes and an AGENTS.md file so each Codex session starts from the same background, sources and open questions.
Problem or Objective
- Which agents investigate a question and report back?
- Which tools build a searchable knowledge base from your documents?
More in Research and Analysis
AI Agents and Models
Tools and Integrations
- Tools
- Git
- Prerequisites
- Codex in the ChatGPT desktop app or the Codex CLI, a ChatGPT plan, and a local folder of notes and source documents.
How It Works
Create a folder for the research area and put it under git. Add a few plain text or Markdown files: one describing your department and its terms, one for neighbouring fields you draw on, a sources list with full references and links, and an open questions file. Open the folder in Codex and use /init to create an AGENTS.md, then edit it to say how you want Codex to work here: read the notes files first, cite a source from the sources list for every claim, mark anything without a source as unsupported, and propose changes to the notes instead of rewriting them. In each session, ask a question, let Codex answer from the notes and any documents you have added to the folder, and ask it to propose additions to the notes with their sources. Review the proposed changes, check each citation against the original yourself, and commit the ones you accept so the next session starts from them.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Codex CLI.
- Connect the toolsConnect the tools this workflow relies on: Git.
- Check the prerequisitesCodex in the ChatGPT desktop app or the Codex CLI, a ChatGPT plan, and a local folder of notes and source documents.
- Gather your detailsCollect what the prompt asks for: Folder with context notes, Question for this session, Folder with source documents, Sources list.
- Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Answer from my research notes
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read AGENTS.md and the notes in [Folder with context notes] first. Then answer this question: [Question for this session]. Use only the notes, the documents in [Folder with source documents] and the references in [Sources list]. Cite a reference for every claim and mark any claim without one as unsupported. Finally, propose additions to the notes as a diff, with their references, and wait for my approval before changing any file.Codex proposes note changes as a diff and edits nothing until you approve. Check every citation against the original source before you commit the change.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Codex README describes a coding agent that runs locally on your computer, and the OpenAI Help Center says Codex is included across ChatGPT plans and that /init generates an AGENTS.md scaffold for the current project. No cited page covers research work or citation checking, so the quality of the answers depends on the notes and documents you keep in the folder and on your own checks.
Limitations and Considerations
A model can attach a real-looking citation to a claim the source does not make, so open each cited source before you rely on it. Keep confidential department material out of the folder unless your organisation allows it in Codex. Usage limits vary by plan. Git history lets you see when a note changed and undo a bad edit. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About openai/codex
Meet the New Codex CLI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- openai/codex README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Codex CLI is a coding agent from OpenAI that runs locally on your computer.
- Using Codex with your ChatGPT plan | OpenAI Help Center (opens in a new tab)
Project documentation · help.openai.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Codex is included across ChatGPT plans, including Free and Go. Usage limits vary by plan.
- Use /init in the ChatGPT desktop app while using Codex to generate an AGENTS.md scaffold for the current project.
- Some Codex features can make Codex more helpful by letting it remember context, continue work over time, and connect with tools you choose to use.
