explaingit

last-emo-boy/codex_goal_hook

12PowerShellAudience · developerComplexity · 2/5Setup · moderate

TLDR

A PowerShell installer that adds persistent goal tracking to OpenAI's Codex coding assistant so that long-running tasks survive session restarts by storing context, memory, and decisions as plain text files in your workspace.

Mindmap

mindmap
  root((codex_goal_hook))
    What it does
      Persistent goals
      Session memory
      Hook integration
    Files stored
      context.md
      memory.md
      decisions.md
    Tech Stack
      PowerShell
      Node.js
      npm
    Use Cases
      Long-running tasks
      Architecture mapping
      Decision tracking
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Keep a running task context that Codex automatically reloads at the start of every new session

USE CASE 2

Track architecture decisions and per-turn notes as plain editable text files inside your project folder

USE CASE 3

Use the /goal command in Codex to activate goal mode and anchor a session to a specific long-running objective

Tech stack

PowerShellNode.jsnpm

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Node.js 18 or later and OpenAI Codex with hooks support enabled, targets Windows environments.

No license information was mentioned in the explanation.

In plain English

This repository provides a skill and installer for OpenAI's Codex coding assistant that adds persistent goal tracking across sessions. The core problem it addresses is that AI coding sessions normally have no memory between restarts: if you set a long-running task (map the architecture, find fragile areas, make an improvement, add tests), that context is lost when you close and reopen Codex. Goal-hook works around this by maintaining a folder called .codex-goal/ in your workspace that stores the ongoing goal, accumulated memory, decisions made, and per-turn notes as plain files on disk. When Codex starts a new session, a hook script reads those files and loads the stored context back in, so the assistant picks up where it left off. The hook integrates with Codex's hooks system, which allows external scripts to run at defined points in the session lifecycle such as when a session starts. Installation uses npm and PowerShell. The installer writes the necessary hook configuration into Codex's config file automatically when the --apply-config flag is passed. After restarting Codex, a /goal command becomes available that activates goal-mode for the current task. The runtime files it creates (context.md, memory.md, decisions.md, and others) are plain text and can be read or edited by hand. The project targets Windows environments given its reliance on PowerShell, though the README includes a brief note referencing a Linux community forum. Node.js 18 or later is required alongside Codex with hooks support.

Copy-paste prompts

Prompt 1
How do I install codex_goal_hook on Windows using npm and apply its config with the --apply-config flag?
Prompt 2
What plain text files does codex_goal_hook create in .codex-goal/ and how can I manually edit them to steer the next session?
Prompt 3
Walk me through the full flow from installing codex_goal_hook to restarting Codex and using the /goal command for the first time.
Prompt 4
How does the codex_goal_hook startup script load stored context back into Codex at the beginning of a new session?
Open on GitHub → Explain another repo

← last-emo-boy on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.