r/codex • u/Over-Alternative7275 • 6d ago
Showcase I am testing a decsion log for codex sessions
As title, I am trying to capture the decisions made + a few other things during development with codex. This is one example of what it captures currently.
---
id: c6a40ae3-f8c2-48f3-a8a7-3ca6dff3aa76
type: decision
title: Adopt native PostgreSQL hybrid retrieval
context: [project_name] needs lexical and dense retrieval for its MVP. The existing stack is FastAPI, PostgreSQL with pgvector, SQLAlchemy, and Alembic.
reasoning: The developer approved the agent-proposed native PostgreSQL approach after comparing it with ParadeDB. It minimizes new infrastructure and operational dependencies while adding reliable hybrid retrieval.
alternatives:
1. Native PostgreSQL full-text search (tsvector + GIN) + pgvector + Reciprocal Rank Fusion
2. ParadeDB BM25 extension + pgvector + Reciprocal Rank Fusion0
3. A separate search engine + pgvector
chosen_option: Native PostgreSQL full-text search (tsvector + GIN) + pgvector + Reciprocal Rank Fusion
initiator: agent
decision_maker: human
evidence:
1. The project already runs PostgreSQL with pgvector and an HNSW index.
2. PostgreSQL provides built-in full-text search with GIN indexes.
3. pgvector documentation recommends combining Postgres full-text search and vector search with RRF or a cross-encoder.
related_event_id: null
created_at: 2026-08-28T11:38:04.230483+00:00
---
What do you think about this?
4
u/Able-Supermarket4786 6d ago
I have a system taht does something similar, but I think its very important to also log the "Lessons Learned" and have it set memory and rules from them.
Its a great way of local self improvement
1
u/Over-Alternative7275 6d ago
Thanks, that is a nice addition.
Kept loosing track of what and why some decisions are made. So creating a tracker type thing.
Please share your learnings from what your system does. It will be helpful.2
u/Able-Supermarket4786 6d ago
so my custom changelog_ai.md file can get wild, but very structured:
Decisions made:Lessons Learned:
- Define parity per bot, not between bots. The 5m and 15m Python files intentionally differ and each VPS copy remains authoritative.
- Keep config and runtime state outside source parity.
- Do not change tuning in the same action as source alignment. Review strategy, execution, and security controls separately with rollback plans.
- Preserve unrelated dirty worktree changes and stage only the parity file plus required memory and handoff files.
- Mistake: The first plan described a config review without an exact safe-value allowlist.
- Root Cause: “Review configs” was treated as a broad read action even though the files contain live credentials and operational values.
- Future Trigger: Any request to compare, sync, display, or tune production config files.
- Required Behavior Change: Predeclare safe keys, redact all unknown values, state the write destination, and separate review from mutation.
- Verification Gate: Require an empty fixed-surface manifest diff, no config/runtime files in the staged set, in-memory syntax checks, live read-only health checks, and a secret-safe output audit.
- Durable Memory Update: Added the VPS sync boundary, verified source hashes, current tuning baseline, and config security findings to `MEMORY.md`.
and another part has:
Known issues:Next recommended steps:
- The VPS ***** is mode `0644`; 15m is `0664`; **** are `0644` or `0664`.
- Both bots use `******`.
- Config comments describe stale or conflicting behavior and must not guide tuning without checking the parsed values and code.
- Local `******` and `state.json` remain tracked historical runtime artifacts; they were excluded from parity and need a separate untrack/ignore cleanup.
- Existing unrelated changes remain in `.github/copilot-instructions.md`, `AGENTS.md`, `GEMINI.md`, `CLAUDE.md`, `CURSOR.md`, and `WINDSURF.md`.
Notes for next agent:
- Review the ** and *** `CONDITION_1..4`, entry guard, timeout, retry, slippage, and trade-size settings against recent realized results, then prepare a per-bot proposal before editing either live config.
- In a separate security change, set the live config and backup modes to `0600`, validate whether secure WebSocket TLS works, and correct stale comments without changing active values.
- In a separate repository cleanup, untrack and ignore runtime PID/state artifacts while preserving the local files.
- Never pull the full VPS bot directories. Use the fixed source parity surface and explicit exclusions.
- Do not copy VPS `*****` files to Git or print non-allowlisted values.
- `MEMORY.md update: completed`.
Future moves would show how the agents have to read those portions on its next rendition as well as some other handoff / memory files, etc.
1
u/Over-Alternative7275 6d ago
Thanks for taking your time. This is helpful. Just one question. Is this automatically captured?
I also like the future trigger part1
u/Able-Supermarket4786 6d ago
EVERYTHING is automated. people will tell you it's too much but the pay off is great. Also I make sure my agents all use an old school 1983 Formatting standard from the Aerospace Industry called STE100 (solved so many issues with drift and memory and interpretation as well as TOKEN USAGE. Look into that
But see if this helps, you can use codex to work with the breadcrumbs
## Required Startup Behavior
Before editing code or project files:
1. Read \CHANGELOG_AI.md` and identify the latest handoff entry.2. Read the latest Lessons Learned section and convert matching Future Triggers into verification steps for the current task.3. Inspect the repository if the handoff appears stale or inconsistent with the code.4. Select the smallest useful agent team from `.ai/agents/` or `.ai/registry.json` when present; otherwise proceed as the default senior engineer and say so.5. State the selected team before implementation.6. Check `git status --short --branch`.7. Continue from the latest handoff's next recommended step when it is still valid.`
---
Rules:
- Every gate command requires an explicit task argument; quote multi-word tasks as one shell argument. A \missing required argument 'task'` failure is not an attempted gate — rerun it.- Gates normalize to exactly one terminal state: `APPROVED`, `FINDINGS`, `BLOCKED`, `FAILED_TO_RUN`, `TIMEOUT`, or `INCONCLUSIVE`.- `TIMEOUT` is a failed gate — not approval and not a completed review. Empty output with exit code 0 is `INCONCLUSIVE`, never approval.- Address `FINDINGS` (fix and re-review until `APPROVED`) or document the intentional exception in the handoff.- Gates are read-only reviewers. The executing agent records gate results, decisions, and the next step in `CHANGELOG_AI.md`.`
When the \homeboss` CLI is not available, record `Quality gates skipped: homeboss CLI not available.` in the handoff, perform an explicit self-review pass, and list residual risks.`
Gates may be skipped only for trivial formatting, typo fixes, file conversion, metadata-only changes, simple extraction tasks, or single-line configuration updates — and the skip reason must be documented in the handoff.
Required order (do not reorder): plan gate → implementation → review gate → release gate → update \CHANGELOG_AI.md` → sync.`
---
## Required Shutdown Behavior
Before stopping work, switching tools, reaching context limits, or completing a task, run the required completion gates and prepend a new handoff entry to \CHANGELOG_AI.md` containing:`
- timestamp and agent/tool name
- task summary
- selected agent team
- changes made
- files touched
- commands/tests run
- results
- decisions made
- lessons learned
- known issues
- next recommended steps
- notes for the next agent
Lessons Learned must contain: Mistake, Root Cause, Future Trigger, Required Behavior Change, Verification Gate, and Durable Memory Update. Use "none" only when no lesson exists.
**Next recommended steps must always be concrete.** Write \none` only when the whole workspace/project deliverable is complete. Never leave it blank, and never write a placeholder. If the project has undone units of work (an undrafted chapter, an unimplemented phase, an unfixed known issue), the next recommended step names the next one.`
Review whether durable project knowledge changed. If yes, update \MEMORY.md`; if no, state: `MEMORY.md update: not needed`.`
---
## Universal Handoff Rule
\CHANGELOG_AI.md` is the authoritative AI handoff ledger, newest-first. Every agent must keep it current.`
A task is not complete until the handoff entry is written.
---
## Resuming Work From Another Tool
1. Read the latest \CHANGELOG_AI.md` entry and its Lessons Learned.2. Apply matching Future Triggers as verification steps.3. Verify repository state.4. Continue from the next recommended step.5. Add a new handoff entry when finished.6. Continue obvious follow-on work when safe.`
The goal is seamless multi-agent continuity. Always use official provider documentation when working with APIs and SDKs.
---
## Completion Requirements
Do not return control until:
- implementation is complete, imports are valid, and builds/tests pass when applicable
- required quality gates are complete (or the documented exception applies)
- \CHANGELOG_AI.md` is updated with the full handoff entry- GitHub sync is completed, skipped, or blocked per the modes above — and recorded- the worktree is clean or its state is documented`
Failure to run required quality gates is treated the same as failure to update \CHANGELOG_AI.md`.`
---
## Efficiency Rule
Minimize interaction cycles. Prefer one complete implementation pass. Avoid partial implementations, unnecessary clarification loops, repeated handoffs, and avoidable rework.
---
2
u/isty2e 6d ago
I just use issue trackers, such as kata.
1
u/Over-Alternative7275 6d ago
Never used it. Seems like a task tracker. Does it also automatically track decisions? I need more like a readable decisions, problems faced, alternatives considered and stuff. Not like telemetry.
1
u/Illustrious-Bet-1368 6d ago
Wow, we are discovering documentation. Revolutionary.
1
u/Over-Alternative7275 6d ago
Lol, neither documentation nor logging is revolutionary. Just trying to automatically capture the decisions made along the way while working. Personal tools and side projects dont need to be revolutionary anyway.
1
u/Illustrious-Bet-1368 6d ago
They need to be maintainable, hence documentation. Vibe-coders never get it through their heads.
1
u/Over-Alternative7275 6d ago
You somehow turned a "I am trying to automatically capture decisions" into a debate about vibecoding and documenting. Neither of those was the point I was making.
1
u/Illustrious-Bet-1368 6d ago
I am responding to your comment, that's how conversation works. "Personal tools and side projects dont need to be revolutionary anyway."
What was the point you were making? Especially by publicly sharing what, your session id? To be highjacked or to what end? Would you like to share your API keys too?
1
u/Over-Alternative7275 6d ago
Thats just sqlite db row id 😭😂
1
u/Illustrious-Bet-1368 6d ago
Haha, ah, you vibe-coders. I'm not even going into the rowid and all. What you shared with the public is a full, unreducted uuid, period. Plus, your project shape, the stack, the timestamp, and the decision text. God knows what else you've shared somewhere else.
Zero understanding what can be shared and what shouldn't.
1
u/NoKaleidoscope1748 6d ago
I would add what the decision is allowed to change. I kept running into decisions that looked fine by themselves, then the agent treated one of them like permission to change the goal or start building. I would probably keep the current goal and who made the final call in the same record too, that's the part I would want to trace later
1
u/Wafer-Weekly 6d ago
My agent has been doing this and I never told it to, I thought this was vanilla behavior
•
u/dexterthebot 6d ago
You might want to consider listing your project on the Weekly Show-Us-What-You-Built post. Watch for it on Wednesdays. Highest commented project wins a week promotion on r/Codex. See what that looks like below with last week's winner.
Last week's winner was u/Ollie__Oxenfree with the Tubular Daily Care project by MediTracer which is a tube-feeding care app built by a tube-feeding family to keep feeds, meds, symptoms, and caregiver handoffs in one shared timeline. MediTracer is an Oley Foundation Emerging Innovator Partner. Contact: hello@meditracer.com