Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1821,13 +1821,42 @@ Browse-only entries do not execute tools or change configuration.
| `/cd` | Change the selected session’s directory after review and confirmation while idle and with no queued messages. Absolute, session-relative and `~/` paths are supported; success is verified from running configuration. Retains thread ID/history; does not reproduce native project-config reload/fork. |
| `/cwd`, `/pwd` | Read-only aliases showing the running session’s current directory, including during active turns. |
| `/rename` | Edit the selected session’s saved name and apply it without a second confirmation. Uses Codex’s name API; works during an active turn and does not send a prompt or change model settings. |
| `/goal` | Inspect this session’s objective, official goal state and token budget/usage. Set an objective, edit it, pause, resume or clear it. Native forms `/goal <objective>`, `/goal edit`, `/goal pause`, `/goal resume` and `/goal clear` are supported. The Budget option (also `/goal budget <positive integer\|unlimited>`) changes the total goal-token budget. Mutations require confirmation by default. |
| `/model` | Advertised models, their descriptions and supported reasoning levels. Choosing a model resets its explicit speed override to the server default. |
| Advertised speed commands, such as `/fast` | Show the default speed and every advertised tier in one list, initially highlighting the current speed. Up/Down highlights; **Enter APPLY** or clicking a choice applies it without a second confirmation. IDs and descriptions come from the current model's catalogue; no tier IDs are guessed. The changed speed is verified before success is reported. |
| `/plan` | Advertised collaboration modes, using Codex's built-in mode instructions. |
| `/permissions` | Named profiles allowed for the session's directory, with supplied descriptions. Review carefully: this changes future permission behaviour. |
| `/skills`, `/apps`, `/mcp`, `/hooks`, `/experimental` | **Browse-only** live inventories and supplied help, including MCP tool descriptions. Invoke/configure these through Codex. |
| `/help` | Available command families. Unsupported or empty catalogues are omitted. |

**Session goals:** a connected shared app-server with its goals feature enabled
is required. Goal status appears directly below the configured statusline fields
in session rows; full detail places it right-aligned on the bottom border before
COPY and other controls, when space permits. Web shows the same per-session state
below row metadata and in the detail footer. **PURSUING GOAL**, **GOAL STALLED**,
**GOAL PAUSED**, **GOAL USAGE LIMITED**, **GOAL BUDGET LIMITED** and **GOAL COMPLETE**
come from Codex—not inactivity guesses—and do not replace WORKING, approvals or
TURN COMPLETE. Unavailable refreshes mark retained observations **GOAL STALE**.
Use `/goal` for the objective and counters. Linked agents do not inherit their
parent’s goal label, and goal observations are not persisted by Codexometer.
The menu shows one compact overview: **Create goal** when empty, or **Edit
objective** to preserve its state and **Replace goal** to start pursuing a new
objective (retaining the budget). Current and proposed values stay separate in
the confirmation review.

Creating or resuming an active goal can start work immediately and consume quota,
even while the session was idle; updating an active objective can guide a running
turn. Editing a paused/stalled goal retains its state; editing a completed or
budget-limited goal reactivates it, matching Codex CLI. Pause/clear stop continued
pursuit but do not interrupt a turn already running. The budget is a **total
goal-token budget**, not an account spending limit; omitted budgets are retained,
and `unlimited` explicitly removes the goal budget. Codexometer accepts objectives
up to 4,096 characters and positive budgets up to 9,007,199,254,740,991; Codex can
impose further limits. Every mutation is session-scoped, freshly revalidated and
verified after acknowledgment, with no automatic retry. `--no-confirm` also opts
out of goal confirmations; read-only web mode never enables goal writes.
Older/unsupported servers omit the live `/goal` family rather than simulating it.

On Codex 0.166.0, `/hooks` queries the selected loaded thread, including hooks
from its execution environments, and identifies their environment when supplied.
Older servers retain directory-based discovery. A real thread/permission/transport
Expand Down Expand Up @@ -1934,7 +1963,7 @@ action keys when using `--no-confirm`.
**Slash-command audit:** the [complete version-matched inventory](docs/slash-command-support.md)
compares Codexometer with Codex CLI **0.162.1**, including aliases, partial support
and the reason for each missing adapter. Several missing commands already have
server APIs (`/compact`, `/fork`, `/review`, `/goal`, `/ps`, `/stop`); they need
server APIs (`/compact`, `/fork`, `/review`, `/ps`, `/stop`); they need
Codexometer workflows. Native display commands need local UI implementations.
The published reference is incomplete for this version and includes older names.

Expand Down
10 changes: 5 additions & 5 deletions docs/slash-command-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Audited on 2026-10-10 against **Codex CLI 0.162.1** (`rust-v0.162.1`), using its

The tables cover all **63 registered command variants** and the three additional accepted aliases `/cwd`, `/pet` and `/clean`: **66 upstream command names** in total. Codexometer’s local `/help` entry and model-advertised speed aliases are outside that count. Platform, feature and debug-build filters affect actual visibility. The [published reference](https://learn.chatgpt.com/docs/developer-commands#built-in-slash-commands) omits some commands in this registry and also lists older names. Codexometer has explicit adapters/local UI implementations; it does not send slash commands as model prompts. There is no generic server endpoint to discover or execute the CLI's slash commands.

“Missing” below means no Codexometer slash adapter, **not** that the server lacks the capability. Live commands require a loaded session and shared app-server; browser control commands require writable mode. Windows' existing file-based monitoring path does not gain live server commands from this change.
“Missing” below means no Codexometer slash adapter, **not** that the server lacks the capability. Live commands require a loaded session and shared app-server; browser control commands require writable mode. Windows' existing file-based monitoring path does not gain live server commands from this change. Goal support below was additionally checked against the current local Codex source and official app-server goal documentation on 2026-11-04; it does not imply a new audit of every registry entry.

## Priority and complexity scale

Expand All @@ -29,13 +29,14 @@ These are proposed priorities for Codexometer's session-monitoring/control role,

Aliases on one row share the rating and implementation. Lifecycle commands share a thread-handoff foundation, so their costs should not be added as independent projects. P1 is a value/need ranking, not a claim that every P1 is a quick win. Work blocked on a foundation comes after that foundation even if it has the same priority.

Local Codexometer support below was updated on **2026-10-11**; the upstream registry snapshot remains 0.162.1.
Local Codexometer goal support below was updated on **2026-11-04**; the upstream registry snapshot remains 0.162.1.

## Implemented and partial support

| Command | Support | Priority | Complexity | Implementation and limits |
| --- | --- | --- | --- | --- |
| `/rename` | Implemented | Done | — | Confirmed `thread/name/set`; works during active turns. |
| `/goal` | Session adapter | Done | — | Session-scoped `thread/goal/get`, `set`, `clear`; native objective/edit/pause/resume/clear forms plus a token-budget editor. Fresh review/verification, default mutation confirmation, live goal notifications and stale-safe snapshot fallback shared by TUI/web. Goal state follows row statusline fields and precedes full-detail controls. Requires a goal-enabled shared app-server. |
| `/cd <path>` | Implemented with narrower semantics | P1 | Very high | Confirmed `thread/settings/update`, sending only `threadId` and `cwd`. Requires idle/local session, empty queue, no pending approval and an existing directory. Resolves relative paths from the running session directory, expands `~`/`~/`, rechecks symlinks and verifies the result from running configuration. No write retries. See the semantics below. Proposed next increment: destination project-context reload with trust/permission validation and a verified conversation handoff. Reuse the lifecycle foundation below; native-client cooperation may still be necessary. |
| `/pwd`, `/cwd` | Implemented aliases | Done | — | Read-only `thread/resume` **without overrides** reports the running directory, including during active turns. Captured `thread/read.cwd` metadata is not used as the answer. The session directory/footer also follows live directory reads and settings notifications. |
| `/model` | Session adapter | Done | — | Live model/reasoning catalogue, confirmed while idle. Clears explicit speed override when selecting a model; does not reproduce native CLI persistence. Session-only scope is intentional; no global-default editor is proposed. |
Expand Down Expand Up @@ -66,7 +67,7 @@ Native `/cd` is a larger client workflow: destination project-configuration relo

## Missing commands with server capabilities or conversation workflows

These are adapter/workflow gaps. Where an API exists it is listed; this PR only adds directory commands.
These are adapter/workflow gaps. Where an API exists it is listed.

| Command | Priority | Complexity | Mechanism / why missing |
| --- | --- | --- | --- |
Expand All @@ -80,7 +81,6 @@ These are adapter/workflow gaps. Where an API exists it is listed; this PR only
| `/compact` | P1 | Medium | `thread/compact/start` exists; needs state checks and completion/error progress rather than reporting a queued operation as done. Proposed next increment: confirmed start plus completion/error tracking, keeping polling and approvals responsive throughout. |
| `/recap` | P2 | High | Native summarization workflow has no adapter/progress UI; verify that workflow before choosing a server operation or prompt. Provisional estimate: first establish the native summarization semantics, then add a reviewed summary workflow without changing the source conversation unexpectedly. |
| `/review` | P2 | High | `review/start` exists; no review-target picker, delivery mode or progress UI. Proposed next increment: target/delivery selection, confirmed start and a dedicated review-progress/result view. |
| `/goal` | P2 | Medium | `thread/goal/get`, `set`, `clear` exist; no goal editor, budget/clear confirmation or goal state. Proposed next increment: read/edit/clear goal and budget with session targeting, confirmation and live state refresh. |
| `/side`, `/btw` | P3 | High | Ephemeral forks need a temporary conversation/draft view, thread routing and cleanup. Proposed next increment: an isolated ephemeral conversation UI with separate drafts, lifecycle cleanup and source-thread return. |
| `/approve` | P1 | High | `thread/approveGuardianDeniedAction` exists; needs exact targeting of a recent automatic-review denial. Ordinary approval buttons are a different action. Proposed next increment: identify the exact retained denied action, review its original scope, confirm the retry and track the result. A generic approval shortcut is insufficient. |
| `/ps` | P1 | Medium | `thread/backgroundTerminals/list` exists; no list/detail adapter. Telemetry process/session views do not reproduce it. Proposed next increment: a read-only, session-scoped terminal list with command/state detail and refresh; foundation for /stop. |
Expand Down Expand Up @@ -135,7 +135,7 @@ These require Codexometer UX, not forwarding the command name to a server.
1. **P1 read-only additions:** `/ps`, `/status` and `/warnings` views. The Low-complexity `/usage` and `/copy` aliases are implemented. They build on existing controls and improve visibility before adding more mutations.
2. **P1 session controls:** `/compact`, the linked-agent `/subagents` picker, and reviewed `/stop`/`clean` built on `/ps`. Add `/approve` as its own High-complexity workflow with exact denied-action targeting.
3. **P1 lifecycle foundation:** `/new`, `/resume` and `/fork`, sharing subscription, selection, draft and history-handoff handling. Then pursue full `/cd` project-context parity; it depends on this foundation and remains Very high complexity.
4. **P2 extensions:** `/plan` inline prompts, `/goal`, `/archive`, `/debug-config`, daemon diagnostics and reviewed `/init`; then `/review`, `/export`, `/diff`, `/mention`, skill invocation and MCP login/inspection. Put `/clear` after `/new`, agent management after linked-agent navigation, and `/worktree` after lifecycle/project-context support.
4. **P2 extensions:** `/plan` inline prompts, `/archive`, `/debug-config`, daemon diagnostics and reviewed `/init`; then `/review`, `/export`, `/diff`, `/mention`, skill invocation and MCP login/inspection. Put `/clear` after `/new`, agent management after linked-agent navigation, and `/worktree` after lifecycle/project-context support. `/goal` is now implemented.
5. **P3/Defer:** optional global/account, import, installation, sandbox, daemon lifecycle, keymap and composer-mode work require explicit scope and demand. Treat daemon diagnostics as the smaller first step to its P2 workflow. Voice, IDE integration and pets should not displace core monitoring/control work. Exclude internal debug and retired/unregistered names.

The next PR should cover **`/ps`**, a Medium-complexity read-only background-terminal inventory. Add **`/status`** and **`/warnings`** as separate read-only increments. The four Low-complexity families (`/usage`, `/copy`, `/theme`, `/exit`/`quit`) are now implemented. Subsequent PRs can add compaction and background-terminal stopping using those views. Full directory-context transitions need a separate design and PR covering project configuration/trust loading, conversation handoff and attached-client behavior.
Expand Down
1 change: 1 addition & 0 deletions internal/codex/daemon_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type sessionStatusProvider interface {
}

type sessionDaemonSnapshot struct {
Goals map[string]*SessionGoal
UsageCoverage map[string]string
Contexts map[string]SessionContext
WorkingDirectories map[string]string
Expand Down
23 changes: 23 additions & 0 deletions internal/codex/daemon_status_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ type daemonStatusProvider struct {
queueRevision uint64
queueCapabilities map[string]queueCapability
contexts map[string]*daemonContextState
goals map[string]goalObservation
goalVersions map[string]uint64
goalGeneration uint64
goalsUnsupported bool
socketPath string

mu sync.Mutex
Expand Down Expand Up @@ -140,6 +144,10 @@ func (p *daemonStatusProvider) Fetch(ctx context.Context, threadIDs []string) (s
}
}
p.statuses = cloneRuntimeStatuses(statuses)
p.mu.Unlock()

p.refreshSessionGoals(ctx, threadIDs)
p.mu.Lock()
snapshot := p.statusSnapshotLocked(threadIDs)
p.mu.Unlock()
return snapshot, true
Expand All @@ -157,7 +165,13 @@ func (p *daemonStatusProvider) cachedStatusSnapshot(threadIDs []string, now time
func (p *daemonStatusProvider) statusSnapshotLocked(threadIDs []string) sessionDaemonSnapshot {
statuses := make(map[string]sessionRuntimeStatus, len(threadIDs))
directories := make(map[string]string, len(threadIDs))
goals := make(map[string]*SessionGoal)
for _, threadID := range threadIDs {
if _, subscribed := p.subscribed[threadID]; subscribed {
if goal := p.goals[threadID].goal; goal != nil {
goals[threadID] = goal.Clone()
}
}
if status, ok := p.statuses[threadID]; ok {
if state := p.contexts[threadID]; status == sessionRuntimeIdle && state != nil && state.completed {
status = sessionRuntimeComplete
Expand All @@ -180,6 +194,7 @@ func (p *daemonStatusProvider) statusSnapshotLocked(threadIDs []string) sessionD
coverage[id] = issue
}
return sessionDaemonSnapshot{
Goals: goals,
UsageCoverage: coverage,
Contexts: daemonContextSnapshot(p.contexts, threadIDs, statuses),
WorkingDirectories: directories,
Expand Down Expand Up @@ -238,6 +253,9 @@ func (p *daemonStatusProvider) unsubscribeMissing(ctx context.Context, threadIDs
p.mu.Lock()
delete(p.subscribed, threadID)
delete(p.contexts, threadID)
delete(p.goals, threadID)
delete(p.goalVersions, threadID)
p.goalGeneration++
delete(p.threadDirectories, threadID)
for key := range p.reroutedTurns {
if key.threadID == threadID {
Expand Down Expand Up @@ -480,6 +498,7 @@ func (p *daemonStatusProvider) readLoop(connection *websocket.Conn, wires ...*da
if envelope.Method == "thread/queue/changed" {
p.queueRevision++
}
p.goalNotificationLocked(envelope.Method, envelope.Params)
if p.contexts == nil {
p.contexts = map[string]*daemonContextState{}
}
Expand Down Expand Up @@ -619,6 +638,10 @@ func (p *daemonStatusProvider) disconnect(connection *websocket.Conn) {
}
p.subscribed = nil
p.contexts = nil
p.goals = nil
p.goalVersions = nil
p.goalsUnsupported = false
p.goalGeneration++
p.reroutedTurns = nil
p.lastStatusAt = time.Time{}
p.statusThreads = nil
Expand Down
5 changes: 5 additions & 0 deletions internal/codex/live_usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type LiveUsageSnapshot struct {
// LiveUsageSession is one independently started local Codex session. Token
// usage from explicitly linked spawned descendants is folded into the root.
type LiveUsageSession struct {
Goal *SessionGoal
ModelSettings SessionModelSettings
ID string
Name string
Expand Down Expand Up @@ -139,6 +140,7 @@ type LiveUsageReader struct {
nameIndexInfo os.FileInfo
daemonContexts map[string]SessionContext
daemonDirectories map[string]string
daemonGoals map[string]*SessionGoal
SessionsRoot string
WriterLocksRoot string
statusProvider sessionStatusProvider
Expand Down Expand Up @@ -406,6 +408,7 @@ func (r *LiveUsageReader) fetchTokenUsage(ctx context.Context, forceFullDiscover
var daemonCoverage map[string]string
r.daemonContexts = nil
r.daemonDirectories = nil
r.daemonGoals = nil
appServerUp := false
r.daemonSubscribedThreads = nil
if r.statusProvider != nil {
Expand All @@ -415,6 +418,7 @@ func (r *LiveUsageReader) fetchTokenUsage(ctx context.Context, forceFullDiscover
r.daemonContexts = daemonSnapshot.Contexts
daemonCoverage = daemonSnapshot.UsageCoverage
r.daemonDirectories = daemonSnapshot.WorkingDirectories
r.daemonGoals = daemonSnapshot.Goals
r.ingestResolvedModelObservations(daemonSnapshot.ModelObservations)
r.daemonSubscribedThreads = daemonSnapshot.SubscribedThreads
}
Expand Down Expand Up @@ -1541,6 +1545,7 @@ func (r *LiveUsageReader) sessionSnapshots(now time.Time, liveWriters map[string
activeCount := 0
anyWorking := false
for _, session := range groups {
session.Goal = r.daemonGoals[session.ID].Clone()
if root := byID[session.ID]; root != nil && !session.Unattributed {
session.ModelSettings = root.modelSettings
}
Expand Down
3 changes: 3 additions & 0 deletions internal/codex/session_command_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func commandMenuPath(path string) string {

func cacheableCommandPath(path string) bool {
// Typed names and paths are short-lived reviews, not catalogue branches.
if _, _, input := SessionCommandInputValue(path); input || strings.HasPrefix(path, "goal ") {
return false
}
return ValidSessionCommandPath(path) && !strings.HasPrefix(path, "/") && !strings.HasPrefix(path, "rename/") &&
!strings.HasPrefix(path, "rename ") && !strings.HasPrefix(path, "cd/") && !strings.HasPrefix(path, "cd ")
}
Expand Down
Loading
Loading