Local Codex thread goal control panel and installable Codex skill.
This is an experiment, not an official Codex surface. Use it with that constraint in mind: the Codex goals feature and app-server goal methods are still an evolving surface, so this repo can break when Codex changes its internal/app-server contract.
The intended use is local operator convenience:
- keep a small goal panel open inside the Codex in-app browser;
- point that panel at the current Codex thread;
- inspect and control the thread goal without jumping to the CLI/TUI.
Do not treat this as production infrastructure or as a stable integration contract yet.
This repo packages a self-contained skill that can:
- claim the current
CODEX_THREAD_ID; - open a localhost goal panel;
- read, set, pause, resume, complete, and clear the current thread goal through Codex app-server;
- show token budget progress when a budget exists;
- animate the progress rail when no budget is set.
- Codex CLI/app with
app-serveravailable. - The Codex
goalsfeature enabled. - Node.js available on the host.
- Localhost access to
127.0.0.1:43873.
Enable goals in your Codex user config:
[features]
goals = trueCodex normally reads this from:
~/.codex/config.toml
You can verify the feature from a terminal with:
codex features list | rg '^goals'Expected shape:
goals under development true
If goals is false or unavailable, the panel can still load, but goal reads/writes will fail.
Clone this repo, then install the bundled skill into your Codex home:
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
rm -rf "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control"
cp -R ./codex-goal-control "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control"Restart/reload Codex after installing if the skill does not appear immediately.
The codex-goal-control skill gives Codex a repeatable way to open the panel for the thread you are currently using.
When invoked, the skill:
- reads the current
CODEX_THREAD_IDfrom the running Codex thread; - writes that thread ID to a local claim file under the OS temp directory;
- ensures the localhost panel server is running;
- returns a URL like
http://127.0.0.1:43873/?threadId=<current-thread-id>.
That threadId step matters. Opening http://127.0.0.1:43873/ by itself is not enough unless a thread has already been claimed. The skill is what makes the browser panel follow the active Codex thread instead of showing stale or empty state.
Ask Codex something like:
Use the codex-goal-control skill and open the goal panel for this thread.
or:
Open the Codex goal panel for the current thread.
From any Codex thread:
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal_panel_open.js" --jsonOpen the returned url, normally:
http://127.0.0.1:43873/?threadId=<current-thread-id>
The app is local-only and served from the installed skill files. It does not require a separate build step.
The direct commands are useful for testing or for terminal workflows. They expect CODEX_THREAD_ID to exist unless you pass --thread <thread-id> explicitly.
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" get
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" set "ship the thing" --budget 3000
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" pause
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" resume
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" complete
node "${CODEX_HOME:-$HOME/.codex}/skills/codex-goal-control/scripts/codex_goal.js" clearThe panel binds to 127.0.0.1 only. It refuses non-localhost bind addresses.
The goal commands use codex app-server and default to CODEX_THREAD_ID, so they target the current Codex thread unless --thread is explicitly passed.
- This depends on Codex
goals, which currently appears asunder developmentincodex features list. - This does not add native
/goalslash-command support to the Codex desktop composer. - The browser panel is a convenience view. It is not proof that the agent intrinsically received or adopted the goal.
- The strongest goal truth remains the Codex thread goal API or native goal state for the active thread.
- In sandboxed runs, the helper may report
started-unverified-sandboxbecause the sandbox cannot verify the localhost listener even though the server started.
