Skip to content

PRD: Codex activity keeps a concise task summary beside Working #183

Description

@miakh

What to build

A Deck Terminal running Codex should remain distinguishable after Codex replaces its descriptive pane title with bounded activity such as Starting | <session-id>, Working | <session-id>, or Ready | <session-id>.

Deck should derive a concise local task summary from the latest meaningful Codex UserPromptSubmit and present both signals together. The repository tree shows the current bounded activity as the row label and the stable task summary beside it as the description. Terminal tabs and agent-status notifications use the stable summary rather than the volatile activity or opaque session UUID.

Leading attachment wrappers are presentation metadata and should not become the summary. Whitespace is normalized and the result is bounded at a Unicode-safe word boundary. An exact continuation-only prompt preserves the previous useful summary; a prompt containing new instructions replaces it.

The summary is presentation-only and stored separately from resume-critical AgentSession identity. /compact preserves it. /clear removes the previous summary and status. Because current Codex versions do not reliably emit the documented clear hook, Deck may use a strictly recognized activity title carrying a different session UUID to repair the stale Codex session boundary. Hook writes and fallback cleanup must be serialized per Terminal so that cleanup from the old chat cannot erase a prompt from the new one. Resume identity must be repaired before best-effort presentation cleanup.

The summary stays local, is never telemetered, and is removed when the Terminal or confirmed agent process disappears.

Acceptance criteria

  • A Codex Terminal with activity Working and a stored task summary renders the activity and concise summary together in the repository tree.
  • The Terminal tab and agent notification identify the task using the stable summary rather than a UUID.
  • Starting, Thinking, Working, Waiting, and Ready are the only pane-title activities promoted into this presentation.
  • Opaque Codex session UUIDs never become user-facing task identity.
  • Leading image or attachment wrappers are excluded from the summary.
  • Whitespace is normalized and summaries are bounded to 96 Unicode characters at a word boundary.
  • Exact continuation-only prompts preserve the previous summary while prompts containing new work replace it.
  • /compact preserves the task summary.
  • /clear removes the previous task summary and status even when Codex omits its clear hook.
  • A concurrent first prompt in the new chat cannot be erased by stale-session cleanup.
  • Presentation cleanup failure cannot prevent repair of resume-critical session identity.
  • Summaries and their live tmux projection are removed when the Terminal or confirmed agent exits.
  • Automated tests cover presentation precedence, hook persistence, session-boundary fallback, cleanup failures, and the clear/write race.
  • Packaged-build QA verifies the tree description, tab title, notification title, /compact, and /clear.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions