Description
OpenAI Codex CLI added a /goal command that implements a persistent, durable objective layer on top of the normal conversation loop. This is distinct from existing session persistence (#2807) — it's an explicit goal object with formal lifecycle management.
Reference: https://developers.openai.com/codex/cli/features
How It Works
/goal create <text> defines a durable objective that persists across turns, interruptions, session resumes, and budget boundaries
- The goal state machine has states:
active, paused, completed, cleared
- TUI controls: create, pause, resume, clear
- App-server API: goals are addressable via the app-server API for programmatic control
- Budget accounting: token/turn usage is tracked against the active goal
- Model tools: goal-constrained model tools that respect goal scope
- Stale update protection: guards against out-of-order goal state transitions
Contrast with Existing Zeph Features
Zeph has:
- Session history in SQLite (persistent across restarts)
/compact for context compression
zeph-scheduler for periodic tasks
What /goal adds that Zeph lacks:
- Explicit multi-turn objective tracking — the agent knows it is pursuing goal G across N turns
- Formal goal lifecycle — not just "keep chatting" but a named, pauseable, resumable objective
- Budget accounting per goal — cost and turn count attributed to a specific objective
- User-visible goal state — TUI shows the active goal and progress
Relevance to Zeph
This pattern is particularly valuable for long-running agentic tasks (refactors, multi-file edits, research cycles). Zeph's orchestrator already has a DAG planner and multi-step execution; adding a /goal layer would let users define the overarching objective that the orchestrator pursues.
Proposed Design Direction
- Add
zeph_goals table to SQLite (id, text, status, token_budget, turns_used, created_at, completed_at)
- Add
/goal <create|pause|resume|clear|status> slash command in all channels
- Expose goal state in TUI status panel
- Pass active goal text as a system context prefix so the LLM always has the objective in scope
- Wire goal token/turn accounting into
CostTracker
References
Description
OpenAI Codex CLI added a
/goalcommand that implements a persistent, durable objective layer on top of the normal conversation loop. This is distinct from existing session persistence (#2807) — it's an explicit goal object with formal lifecycle management.Reference: https://developers.openai.com/codex/cli/features
How It Works
/goal create <text>defines a durable objective that persists across turns, interruptions, session resumes, and budget boundariesactive,paused,completed,clearedContrast with Existing Zeph Features
Zeph has:
/compactfor context compressionzeph-schedulerfor periodic tasksWhat
/goaladds that Zeph lacks:Relevance to Zeph
This pattern is particularly valuable for long-running agentic tasks (refactors, multi-file edits, research cycles). Zeph's orchestrator already has a DAG planner and multi-step execution; adding a
/goallayer would let users define the overarching objective that the orchestrator pursues.Proposed Design Direction
zeph_goalstable to SQLite (id, text, status, token_budget, turns_used, created_at, completed_at)/goal <create|pause|resume|clear|status>slash command in all channelsCostTrackerReferences