Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Codex + Obsidian-style Session Memory

This repo provides a portable setup for Codex automatic session memory + recall on Windows.

What it does

  • Creates one timestamped file per Codex session:
    • sessionmemory-YYYYMMDD-HHMMSS-sessionid.md
  • Appends later turns of the same session to the same file.
  • Runs recall before non-trivial answers via developer_instructions.
  • Writes latest recall result to last-recall.md.

Repository files

  • scripts/agent-session-memory-notify.ps1
  • scripts/agent-session-memory-recall.ps1
  • scripts/install.ps1
  • scripts/uninstall.ps1
  • AGENTS.md (instructions for coding agents)

Prerequisites

  • Windows PowerShell 5+ (or PowerShell 7+)
  • Codex CLI installed and usable (codex --version)
  • You have run codex at least once (so ~/.codex/config.toml exists)

Install on a new computer

1) Clone

git clone https://github.com/Justike001/CodeXWithObsidian.git
cd .\CodeXWithObsidian

2) Run installer

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1

This installer will:

  • copy scripts to ~/.codex/scripts
  • back up ~/.codex/config.toml
  • preserve existing developer_instructions and append a managed memory block
  • set user env var CODEX_AGENT_MEMORY_ROOT (default ~\AgentSessionMemory)

3) Restart Codex

Close and reopen Codex CLI.

Notify safety behavior

  • If your config already has an unrelated notify, installer aborts to avoid silent override.
  • To intentionally replace existing notify:
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1 -ForceOverrideNotify

Optional custom paths

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1 `
  -CodexConfigPath "$env:USERPROFILE\.codex\config.toml" `
  -CodexScriptsPath "$env:USERPROFILE\.codex\scripts" `
  -MemoryRoot "$env:USERPROFILE\AgentSessionMemory"

Verify installation

codex exec --skip-git-repo-check "reply OK"
Get-ChildItem "$env:USERPROFILE\AgentSessionMemory" -Filter "sessionmemory-*.md"
Get-Content "$env:USERPROFILE\AgentSessionMemory\last-recall.md"

Uninstall

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\uninstall.ps1

Optional: also remove memory notes folder.

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\uninstall.ps1 -RemoveMemoryRoot

Behavior:

  • Restores newest config.toml.bak-* if present.
  • If no backup is found, removes only this project's managed notify and managed block in developer_instructions.
  • Removes agent-session-memory-*.ps1 from ~/.codex/scripts.

Open in Obsidian

Open this folder as a vault root:

%USERPROFILE%\AgentSessionMemory

Troubleshooting

  • If config.toml does not exist, run codex once, then rerun install.
  • If notify/recall seems inactive, restart terminal + Codex.
  • Installer creates a backup: config.toml.bak-YYYYMMDD-HHMMSS.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages