jackwener/maka-agent

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

Closed

#3,022 opened on Aug 14, 2026

 (0 comments) (0 reactions) (0 assignees)TypeScript (0 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (1 star)
PR merge metrics
 (No merged PRs in 30d)

Description

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

Contributor guide