02. TUI & Daily Workflow
πͺπΈ Ver este capΓtulo en EspaΓ±ol
This chapter explains every visual component of openonyx chat, how to tune reasoning effort (--effort) and hot-swap the LLM target, how multi-turn memory and tiered context (/compact) work, how to navigate the five ephemeral F1..F5 views (with the Ctrl+K palette and /view), and how to supervise subagents from the F2 Agents view (or the /agent picker).
1. TUI Anatomy
Running openonyx chat organizes the terminal into four zones:
β F1 Chat Β· F2 Agents Β· F3 Sprout Β· F4 Plan & Diff Β· F5 Timeline Β· Esc:Quit βββββββββββββββ
β openOnyx [BUILD] [SANDBOX:workspace] Β· gemini/gemini-2.5-pro (effort:high) β
β goal: Refactor the parserβ¦ Β· phase: thinking / streamingβ¦ Β· #1 [root] [subagents:1] β
β β Tab: Plan/Build Β· F2: Agents Β· /rewind Β· /fork Β· /services Β· Esc: quit β
ββ ctx: 24% Β· in: 18.4k (cache 12.1k) Β· out: 1.9k Β· think: 0.6k Β· ~$0.024 βββββββββββββββββ
ββ Memory & Trace (Up/Down/PgUp/PgDn/Home/End) βββββββββββββ Live Plan ββββββββββββββββββββ
β [user] Refactor the parser... ββ [x] Inspect AST β
β [call] scent_outline {"path":"src/parser.rs"} ββ [>] Edit parser.rs β
β [obs] @TOON v1 ... ββ [ ] Run cargo test β
β [stream] Updating range validation...β ββββββββββββββββββββββββββββββββββ€
β ββ Services (Sprout) β
β ββ [READY] postgres (5432) β
β ββ [READY] api (8080) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ [BUILD] Goal / Command (Enter send Β· Tab Plan/Build Β· F2 Agents Β· /rewind Β· /fork β¦) βββ
β > _ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Compact Header (Tabs + Title + Body + Telemetry)
- Tab strip (top row, right-aligned):
F1 Chat Β· F2 Agents Β· F3 Sprout Β· F4 Plan & Diff Β· F5 Timeline, with the active view in bold white. It ends withEsc:QuitinF1 ChatorEsc:Backin the ephemeral views; when an approval is pending outsideF1 Chat, it is replaced by the red [F1 Chat !APPROVAL] badge (blind approval is forbidden:y/nnever approve or deny in the other views). - Title row:
openOnyx [BUILD] [SANDBOX:workspace] Β· gemini/gemini-2.5-pro (effort:high)β mode badge ([BUILD]/[PLAN]/[EXPLORE]), sandbox badge ([SANDBOX:workspace|strict|off]), the[UNTRUSTED]tag when the workspace is untrusted, and the live LLM targetprovider/model (effort:low|medium|high|auto), hot-swapped by/profile//provider//model//effort(section 2.1). - Body rows:
- Animated Braille emblem (
6Γ3sub-pixel canvas, throttled to 90 ms) rotating smoothly while work is in progress (thinking,acting,waiting_children) and resting when idle or awaiting approval. - Goal & phase: the focused agent's
goal:andphase:with its ID/name/role (#1 openonyx-1 [root]), the[subagents:N Β· bg:M Β· F2](or[N/M agents Β· F2]) and[queued:N]tags, and β when session saving is active (--auto-saveor--snapshot-dir) β the livevault:<session>badge (automatically updated when branching via/forkor/rewind). - Agent strip or quick hints: when multiple agents exist, renders a compact single-line agent strip; otherwise shows quick hints.
- Animated Braille emblem (
- Bottom border (Live Telemetry):
- Approximate context window fill (
ctx: <1%orXX%, plus[compacted]after/compact). - Cumulative provider counters:
in,cache(prompt cache hits),out, andthink(reasoning tokens when reported). - Estimated USD cost (
~$0.024) for known cloud models, orlocalwhen using a custom--api-base. - Telemetry lives outside the EAV graph so it never perturbs deterministic ticks, snapshots, or replay.
- Approximate context window fill (
Memory & Trace Pane & History Navigation
- Displays the full trace of the focused agent: user prompts, tool calls (
[call]), observations ([obs]), model replies, system notes ([system]), and live SSE previews ([stream] ...β, rendered inpump_idlewithout advancing ticks). - Smooth scrolling: use
Up,Down,PgUp,PgDn,Home,End,Ctrl+U, andCtrl+Deven while an approval box is open. Scrolling up shows[SCROLLED -N lines | End to follow]; pressingEndor submitting a prompt snaps back to auto-follow.
Automatic Side Panels (>= 100 Columns)
When terminal width is at least 100 columns, the center area splits 70% (Memory & Trace) / 30% (right side):
Live Plan: opens automatically whenplan_updaterecords steps ([x]done,[>]in progress,[ ]pending).Services (Sprout): opens when a validsprout.tomlexists in the workspace, showing color-coded service states ([READY],[STARTING],[PENDING],[FAILED],[OFF]).- When both are active, the right pane splits vertically
50%/50%.
Approval Box with Colorized Unified Diff (y / n)
Whenever an agent requests a mutating tool (fs_write, fs_edit, shell_exec, service_start, service_stop, service_exec) requiring confirmation:
- The banner identifies the requesting agent explicitly:
[agent #id name]. - For
fs_writeandfs_edit(including atomic multi-hunk edits), a colorized unified diff preview is rendered before anything touches disk. - Press
yto approve ornto deny. - Only from
F1 Chat: in the ephemeralF2..F5views,y/nnever approve or deny; the tab strip shows the[F1 Chat !APPROVAL]badge to remind you to return toF1and review the diff and the# impact:line.
2. Tuning Reasoning Effort (--effort)
Control how much internal reasoning budget the model spends:
| Value | Gemini (thinkingLevel) | OpenAI-compatible (reasoning_effort) | Recommended Use |
|---|---|---|---|
low | LOW | low | Quick lookups, read-only tasks, lightweight local models |
medium | MEDIUM | medium | Everyday editing, debugging, and refactors |
high | HIGH | high | Architecture design, subtle bugs, deep audits |
Set via flag or environment variable (precedence: --effort > ONYX_EFFORT > GEMINI_THINKING_LEVEL / OPENAI_REASONING_EFFORT):
openonyx chat --effort high --auto-save
# or via environment variable:
export ONYX_EFFORT=medium
For
anthropic: the effort maps to an extended-thinking budget (thinking.budget_tokens:low2048 /medium8192 /high16384 tokens) when no explicit budget is set. You can pin it with--thinking-budget <n>(orANTHROPIC_THINKING_BUDGET;0= off, range1024..=60000), which also raisesmax_tokensabove the budget. The provider also supports prompt caching (cache_control: ephemeralon the system block and the last tool definition) and automatic retries on429/529(chapter 06).
2.1 Hot-Swapping the LLM Target (/profile, /provider, /model, /effort)
Beyond effort, the full LLM target (provider, model, api_base, and effort) is hot-swappable without restarting the session:
- Profiles:
[[llm_profiles]]blocks in.onyx/config.toml(trusted workspace) withid,provider(gemini|openai|anthropic),model,effort, optionalapi_base, and optionalapi_key_env. Never literal keys in the file (details in chapter 03). - Slash commands:
/profile [id]lists or applies a profile,/provider <gemini|openai|anthropic>,/model <name>, and/effort <auto|low|medium|high>. Changes apply at the next tick boundary and are sealed in theONYXTR2transcript (deterministic replay). - Live header: the title row switches to showing
provider/model (effort:...)of the active target instead of the startup one. Ctrl+Kpalette: a typing-free alternative β filter profiles, providers, and efforts, then run withEnter(LLM actions go through the deterministic bus exactly as if typed; a profile without credentials is shown asunavailablewith its reason and is not selectable).- Web UI (
openonyx serve): the LLM target button (brand subtitle) opens a modal dialog with profile/model/effort and Apply/Cancel buttons, without exposing credentials to the browser.
Credentials never live in the config: each profile resolves its key via
api_key_env(or the provider's standard variable βONYX_API_KEY). A profile missing its key or with a rejectedapi_baseis listed asunavailablewith the actionable reason.
3. Multi-Turn Conversations, Active-Root Guard & /new
Automatic Continuation (continue_agent)
Once a turn finishes (Settled), submitting a follow-up prompt reactivates the same root agent via continue_agent, preserving its entire rel_memory with monotonic step counts rather than spawning an amnesic agent.
Follow-Up Prompt Queue While Busy (queued:N)
While the root agent is actively working (thinking, acting, waiting_children, or waiting_approval), you can type your next follow-up and press Enter: instead of racing a second root agent over the workspace, the TUI queues it automatically (queued:N shown in the header and input border, previewed when the input is empty, and clearable anytime with Ctrl+X) and dispatches it the moment the current turn settles. Immediate commands (/agent, /mode, /services, /service, /undo) still execute right away.
/ & @file Autocomplete, Cursor Editing & Input History
- Visible UTF-8 cursor: edit anywhere inside the prompt using
Left,Right,Home,End,Backspace, andDelete. - Prompt history: cycle previous prompts with
Alt+Up/Alt+Down(orCtrl+P/Ctrl+N), restoring your unsent draft when returning to the bottom. /popup: typing/at the start of the line opens a floating command menu with short descriptions (β/β,Tab/Enterto accept,Escto dismiss).@popup: typing@at the start of a word (e.g.review @tui) fuzzy-filters cached workspace paths (respecting ignored directories and.onyx/vault) and inserts the clean relative path onTab/Enter.
Starting Fresh (/new)
/new: marks the next prompt to spawn a clean root agent with fresh memory./new <goal>: immediately spawns a fresh root agent with<goal>and auto-focuses it in the TUI.
4. Tiered Context & /compact [focus]
To prevent long sessions from overflowing context windows or burning unnecessary tokens, openonyx uses a shared Tier 0 / Tier 1 / Tier 2 context engine across both Gemini and OpenAI:
- Tier 0 (Full): the latest 10 tool observations are kept verbatim.
- Tier 1 (Coordinate-Preserving Summaries): older outputs from
fs_read,scent_outline,scent_impact,code_search,glob_files, andshell_execare deterministically summarized while keeping paths, line ranges, and exit codes, maintaining cache-stable prefixes for prompt caching. - Tier 2 (
/compact& Auto-Compaction): upon reaching the auto-compact threshold (80%of context budget) or running/compact [focus],CommandSpawnerSysteminserts a verified[session_summary]boundary.
/compact
/compact jwt authentication and middleware
Providing a [focus]:
- Rescues
files_foundand keyword-matchedfocus_matchesfrom earlier turns. - Drops active
ctx:fill immediately on the next turn. - Records a
cmd:/compactmilestone insnapshots.onyxpack. - Loses nothing: pre-compact ticks remain intact in the graph and
snapshots.onyxpackforinspect,replay, andrewind.
5. Modular F1..F5 Views, Ctrl+K Palette & /view
Besides F1 Chat (trace, side panels, input, approvals), the TUI exposes four ephemeral views you can jump to with the function key, /view <name>, or the Ctrl+K palette:
| View | Key | Slash | Contents |
|---|---|---|---|
F1 Chat | F1 | /view chat | Memory & Trace, Live Plan / Services (Sprout) panels, input and approvals |
F2 Agents | F2 | /view agents | Graph agents + async [bg] jobs (with a β <driver> badge when an external CLI harness runs the worktree) |
F3 Sprout | F3 | /view sprout | sprout.toml services (status badges) + live logs of the selected service |
F4 Plan & Diff | F4 | /view plan | Active plan (ws.plan.text) on top + Git effects ledger (tick, tool, target, reversibility, (undone)) below |
F5 Timeline | F5 | /view timeline | snapshots.onyxpack milestones (tick, tag, size, checksum) for /rewind / /fork |
- 100% ephemeral navigation: switching views writes nothing to the graph, emits no bus events, and advances no ticks β it is just a different "lens" over the same deterministic state.
F2 Agents:Up/Downselect (the focused agent carries the*marker),Enterfocuses that agent'sMemory & Traceand returns toF1 Chat,Escreturns toF1 Chat.F3 Sprout:Up/Down/PgUp/PgDnnavigate services;s/x/r/a(start/stop/restart/all) andf(log follow) are gated: inPLAN/EXPLOREmode or with an[UNTRUSTED]workspace the view header showsMUTATIONS BLOCKEDand the action is rejected with a notice.F4 Plan & Diff:Up/Downscroll the Git effects ledger.F5 Timeline:Up/Downselect a milestone,Enterruns/rewind <tick>,fruns/fork.Esc: closes popups or the palette if open; inF1 Chatit quits cleanly; inF2..F5it returns toF1 Chat(the tab strip label readsEsc:QuitorEsc:Back)./view <chat|agents|sprout|plan|timeline>(case-insensitive): intercepted atEnterat the TUI level β 0 bus events, 0 ticks, 0 graph writes./viewwith no argument shows usage; an unknown name shows a transient notice.Ctrl+Kpalette: centered popup (Ctrl+K Palette β type to filter) with three groups β VIEW (F1..F5), LLM ([[llm_profiles]]profiles, providers, and efforts) and AGENT (by ID/name). Type to filter (every printable character filters βj/kincluded, they never navigate),Up/Down(orCtrl+P/Ctrl+N) select,Enterexecutes,Esc/Ctrl+Kclose. It has top priority (exceptCtrl+C) and swallows every key while open; LLM actions are sent through the deterministic bus and sealed inONYXTR2, exactly as if typed.
6. Multi-Agent Workflow: Subagents, F2 Agents View & /agent
The root agent can delegate subtasks in two ways: synchronous graph subagents (spawn_agent, sharing the workspace and awaited by the parent) and asynchronous jobs in isolated Git worktrees (spawn_subagent / /spawn, chapter 05).
- Safe default step cap: synchronous subagents inherit a default cap of
32steps (DEFAULT_SUBAGENT_MAX_STEPS, overridable viamax_stepsinspawn_agentJSON args) to prevent runaway loops in local models. While children are active, the parent entersWaitingChildren. - Live inspection with the
F2 Agentsview: pressF2anytime to jump to the full-screen Agents view:- Lists every graph agent (root and subagents) with ID, name, role (
root/sub), current state, and goal. - Also lists async
[bg]jobs with their status (running,done,merged,failed), worktree branch, and β when an external harness runs the job β aβ <driver>badge. Up/Downselect,Enterfocuses the agent'sMemory & Trace(back toF1 Chat),Escreturns toF1 Chat.
- Lists every graph agent (root and subagents) with ID, name, role (
- Alternative shortcuts:
/agent(or/agents): opens the centered Agent Selector popup (or cycles to the next agent when only one exists)./agent <id|name>: jumps directly to an agent (e.g./agent 1or/agent researcher).Ctrl+K: the palette also lists agents;Enterfocuses and returns toF1 Chat.Ctrl+Tab: quick-cycles focused agents (terminal-dependent alias;F2,/agent, and the palette work everywhere).
- External drivers from the Web UI: in
openonyx serve, the Subagent driver selector picks a declared[[external_drivers]]; sending free text with a non-native driver makes the browser emit/spawn --driver <id> <text>(chapter 05).
7. Interactive Time Debugger (TimeFreeze, SDD-07)
TimeFreeze lets you pause the session at any tick and step through it without spending tokens or touching disk: tick boundaries live in a RAM ring (on-disk milestones from --snapshot-dir overlay it as references) and the whole state is 100 % ephemeral until you confirm a branch (/go with the cursor anchored in the past creates the fork; nothing is written before that).
Freezing, scrubbing, and getting out
| Action | How |
|---|---|
| Freeze / unfreeze at the cursor | Ctrl+T or /time (ephemeral toggle) |
| Scrub β1 / +1 over available ticks | Alt+β / Alt+β (looking at the past auto-freezes) |
| Return to present without quitting the app | Esc while TIME FROZEN (a second Esc when live: exit) |
Jump to a specific tick (milestones [pack:*], [ram], (present)) | F5 Timeline β Down/Up β Enter |
While frozen, the amber banner appears (βΈ TIME FROZEN Β· tick X / present Y + the files that would be reverted when branching, RAM-only) and plain prompts are blocked: an out-of-order turn would break the bit-for-bit replay. The escape routes (/β¦ and !β¦) keep working always, even with the agent busy in Thinking (the pre-LLM breakpoint): they run immediately, never queued.
0-token primitives and frozen-graph surgery
| Command | What it does |
|---|---|
/step [n] | Advance n deterministic ticks with 0 LLM calls (default 1; works frozen) |
/step-llm | Exactly one LLM turn: gate + branch if needed + re-freeze when it answers |
/go (alias /unfreeze) | Branch from the cursor if it looks at the past, then resume at present |
! <cmd> | Run a deterministic shell command in the sandbox and seal the result (0 network, 0 disk) |
/read <path> [a..b] | Read a file (or line range) into memory, 0 tokens, frozen-safe |
/inject <text> | Stage a sealed user memory into the timeline (0 tokens) |
/graph inspect [agent|mem|ws] | Read-only report of the frozen graph (memories with mem_seq, agents, workspace) |
/graph drop-mem <seq|a..b> | Drop memories by mem_seq without advancing time |
/graph edit-mem <seq> <text> | Edit an existing memory in place |
/graph set-goal <text> | Change the root agent's goal inside the frozen graph |
These primitives are sealed into ONYXTR2 (/__onyx_det_*): offline replay reproduces them bit-for-bit with 0 I/O and 0 network. The Web/PWA view (openonyx serve) has full parity: the #tick-pill opens the same amber bar, POST /api/v1/time/scrub applies ephemeral scrubs, plain prompts under freeze get an actionable 409 Conflict, and root memories expose β/Γ buttons β see chapter 04.
Non-goal: Sprout (services/containers) and MCP server effects are external process side effects, not graph mutations:
TimeFreezedoes not rewind them (nor revert them when branching).
8. Quick Reference of Keys & Slash Commands (chat)
| Key / Command | Action |
|---|---|
Enter | Submit goal, follow-up prompt, or slash command |
Tab | Toggle [BUILD] β [PLAN] in place |
F1..F5 | Switch ephemeral view (Chat, Agents, Sprout, Plan & Diff, Timeline) |
Ctrl+K | Open the command palette (views + LLM slash commands + agents); type to filter, Enter executes |
Ctrl+Tab | Quick-cycle focused agent (terminal-dependent alias for F2 / /agent) |
y / n | Approve or deny a pending mutating tool diff (only in F1 Chat; other views hint to press F1) |
Up/Down/PgUp/PgDn/Home/End/Ctrl+U/Ctrl+D | Scroll Memory & Trace history |
Alt+β / Alt+β | TimeFreeze: scrub the cursor β1/+1 over available ticks (auto-freezes when looking at the past) |
Ctrl+T | TimeFreeze: toggle freeze at the cursor / return to present (ephemeral, 0 disk) |
Esc | Close popup/palette; while TIME FROZEN return to present without quitting; in F2..F5 back to F1 Chat; in F1 Chat exit cleanly (flushing snapshot & transcript) |
Ctrl+C | Exit cleanly (flushing exit snapshot & transcript, if configured) |
/view <chat|agents|sprout|plan|timeline> | Switch views from the prompt (ephemeral: 0 bus events, 0 ticks, 0 graph writes) |
/agent [id|name] | Open agent selector or focus specific agent |
/mode [plan|build|explore] | Switch mode explicitly or toggle PLAN β BUILD |
/undo | Revert latest reversible Git checkpoint (also cleans newly created fs_write files) |
/rewind [tick] | List milestones or rewind live to <tick> into a safe sibling fork |
/fork [name] | Branch snapshots up to current tick into a sibling directory |
/time | TimeFreeze: toggle freeze at the current cursor (ephemeral, 0 disk) |
/go (alias /unfreeze) | TimeFreeze: branch if the cursor looks at the past, then resume at present |
/step [n] | TimeFreeze: n deterministic ticks with 0 LLM (default 1; frozen-safe) |
/step-llm | TimeFreeze: exactly one LLM turn (gate + branch + re-freeze) |
! <cmd> | Deterministic sandboxed shell with the result sealed into ONYXTR2 (frozen-safe) |
/read <path> [a..b] | Read a file (or range) into memory, 0 tokens (frozen-safe) |
/inject <text> | Sealed user memory staged into the timeline, 0 tokens (frozen-safe) |
/graph <inspect|drop-mem|edit-mem|set-goal> | Read-only inspection or surgery on the frozen graph (memories by mem_seq, goal) without advancing time |
/compact [focus] | Compact older turns while rescuing focus matches and discovered files |
/services | Print @TOON v1 status of services defined in sprout.toml |
/service <start|stop|logs> <id|all> [tail] | Control Sprout services directly from the TUI |
/new [goal] | Prepare or immediately launch a fresh root agent |
/profile [id], /provider <gemini|openai>, /model <name>, /effort <auto|low|medium|high> | Hot-swap the LLM target (section 2.1) |
/spawn [--driver <id>] <goal> | Launch an async job in an isolated Git worktree (chapter 05) |
/subagents | List async [bg] jobs (status, branch, touched files) |
/merge <job_id> | 3-way merge the job's worktree (Ask/Deny governance, chapter 03) |
/discard <job_id> | Cancel the job and remove its worktree and temp branch |
β 01. First Steps Β· English Index Β· Next: 03. Modes, Permissions & OS Sandbox β