Skip to content

feat(cli): TUI surfaces no autonomous-goal state — no indicator, no /goal view #3022

Description

@me2seeks

Problem

When the agent arms an autonomous goal (GoalSet), the TUI gives the user almost no signal about what is running:

  • No persistent indicator. The status line shows title / permission mode / model / ctx / cost / cache / connection / cwd — nothing about a goal. During a waiting backoff (up to 5 min, GOAL_WAIT_BACKOFF_MAX_MS) the user sees an idle prompt while the goal will spontaneously continue.
  • Goal continuation turns render as ordinary user prompts. pi-transcript.ts maps any origin that is not legacy_automation to 'user', so origin: { kind: 'goal' } turns appear as if the user typed the [Goal continuation] ... preamble. There is no marker like the desktop's "goal continued" chip (packages/ui/src/chat-turn.tsx).
  • No way to inspect the goal. Iterations, elapsed time, token budget/spend, pause state and the evaluator's last reason are all invisible. The only user-facing query path is asking the model to call GoalStatus — which costs a model turn.

Codex (the reference for this feature) ships a bottom-pane goal indicator (active with token budget or elapsed time, Goal paused (/goal resume), stalled, budget-limited, complete) and a /goal summary command.

Proposal

Surface-layer only; the host protocol already exposes goal.query with the full projection (status, setAt, pausedAt, iterations, maxIterations, tokensSpent, tokenBudget, lastReason):

  1. Add a goal query to the CLI session driver (connection.request('goal.query', ...)).
  2. Render a goal segment in the TUI status line: status + iteration/max + elapsed (from setAt, frozen at pausedAt when paused). Refresh at turn boundaries and on session attach — every goal transition is adjacent to a turn boundary or a control action, so no new subscription machinery is needed.
  3. Render goal-origin turns with a distinct marker (parallel to the legacy_automation block) instead of as plain user messages.
  4. Add /goal (no args) printing condition, status, iterations, elapsed, tokens vs budget, and last reason.

Out of scope here: /goal pause|resume|clear control actions and Ctrl+C pause notices — tracked separately.

Generated-by: Maka

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions