Repository navigation
Description
Problem
I keep agent sessions open for hours and decide when to compact or reset them by looking at two numbers: how long the session has worked, and how large its transcript has grown. Ovis shows neither. The chat shows "Worked for …" for one turn, and a Goal row only when a turn's tool answer matches the omo goal shape (src/lib/goals.ts). A Codex goal does not appear, and nothing totals the session.
Codex keeps the active goal in its own state store (thread_goals in the Codex state database), not in the rollout the chat reads. I have not verified whether a supported app-server or herdr call exposes it.
Without the totals I leave the app to run du on a rollout file or sqlite3 on the goal database, or I guess. That is the moment a session should have been compacted or reset.
Proposal
Add a compact session line to the chat header, or to the pane's ⋯ menu when the header is full:
- Active goal: objective and status, with tokens and time when the source reports them. For omo this is today's goal answer; for Codex it needs a supported source, or a read of thread_goals if the maintainer accepts that dependency.
- Worked time: the sum of the session's turn durations, which the chat already computes per turn, or wall time from the first to the last recorded event. Say which one it is.
- Transcript size: the rollout or transcript file's size when the agent has one. server/codex.ts already resolves the Codex rollout path.
Read-only, per pane, updated as turns arrive, and "unknown" when a source is missing. No new storage, no background polling of files the pane does not already read.
The metrics can land first and the goal follow; the goal is the part that needs a source decision. Reading a Codex-internal database is a maintenance cost, so a herdr field would be better if it exists or can be added.
Where
Chat and prompt cards.
Where it exists today
The Codex desktop app shows the active goal. The Codex CLI writes the rollout file the chat already parses, and its size is readable there. Ovis already shows per-turn durations and omo goal rows, so this extends existing surfaces rather than adding a new concept.
I did not find a herdr field for goals in the pane or agent records I read.
Workarounds and alternatives
Run du on the newest rollout file under the Codex sessions directory, query thread_goals, or call get_goal. Those are outside the app and easy to forget.
A tooltip with the same three values, or a Settings row that shows them for the selected pane, would also meet the need if a header line is too much surface.
Activity
feat(chat): show the session's work time, transcript size and goal in…