Skip to content

FEAT: start, resume, and inspect Codex sessions - #115

Merged
merefield merged 11 commits into
mainfrom
feat/session-navigation
Nov 21, 2026
Merged

merefield merged 11 commits into
mainfrom
feat/session-navigation

Conversation

@merefield

@merefield merefield commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Why

Give Sessions one place to start a conversation, reopen an older one, or inspect what a live session is doing—without mixing saved history into the live list.

Changes

  • The live Filter still matches names, paths and IDs. The separate Resume picker searches saved session names case-insensitively from an in-memory metadata index, with a Time ago column and Markdown previews. In the terminal, R opens Resume from the Sessions list; quota Refresh stays on the other tabs.
  • New session opens a blank draft. Its first send creates the thread in an already-trusted Codex folder, using native defaults. The draft can instead resume a saved thread. Slow telemetry does not cause a resend, and strict confirmation binds the exact action.
  • The Agents count and /subagents show linked agents and read-only transcripts without changing the parent composer or approval target. /ps lists and refreshes background terminals without adding process controls.
  • Web read-only mode supports browsing and previews. Starting or resuming sessions requires opt-in control. Preview and resume still verify the target with Codex; cached metadata is cleared on account or connection changes.

Includes the follow-up work from #116.

Verification

  • Targeted race-enabled Go tests for the app-server, terminal and HTTP paths.
  • Playwright regression tests for saved names, paging, Markdown, resume, new-session drafts and linked-agent history.
  • Frontend checks and build, local binary build, and the duplication ratchet.

@merefield merefield changed the title Separate live filtering from saved-session resume and add Sessions inspection FEAT: start, resume, and inspect Codex sessions Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change still has active localization issues in the new terminal inspector and session draft, leaving user-facing strings untranslated across non-English locales.

2 open issues
What changed in this PR

Adds end-to-end Codex session lifecycle support across the terminal UI, web UI, Codex integration, and read-only inspection flows. Users can search and preview saved sessions, resume existing threads, start new sessions, and inspect linked agents or background terminals.

Changes:

  • Adds saved-session metadata search, previews, pagination, and resume workflows.
  • Adds trusted new-session drafts with exact confirmation and uncertain-outcome handling.
  • Adds read-only linked-agent transcripts and background-terminal inspection across terminal and web interfaces.
  • Updates commands, documentation, tests, localization, and generated web assets.
File Description
web/​src/​state.svelte.ts Adds session search, inspection, creation, and resume state and API bindings.
web/​src/​SessionTranscript.svelte Renders saved-session and linked-agent transcripts with Markdown projections.
web/​src/​SessionSearch.svelte Adds reusable session search input behavior and styling.
web/​src/​Sessions.svelte Integrates saved sessions, new-session drafts, and inspectors into the Sessions page.
web/​src/​SessionNew.svelte Implements the web new-session draft and first-message workflow.
web/​src/​SessionInspector.svelte Provides web linked-agent and background-terminal inspection panels.
web/​src/​SessionCommands.svelte Adds web routing for the /resume, /subagents, and /ps commands.
web/​src/​SavedSessions.svelte Adds saved-session search, previews, age display, pagination, and resume controls.
web/​src/​contracts.generated.ts Registers the new local slash commands in frontend contracts.
README.md Documents session search, resume, creation, linked-agent inspection, and terminal inspection.
internal/​web/​session_transcript.go Projects saved transcripts into sanitized Markdown-capable web data.
internal/​web/​session_mutation.go Implements exact-consent handling and new-session mutation validation.
internal/​web/​session_mutation_test.go Tests new-session authorization, confirmation binding, and outcome handling.
internal/​web/​session_inspector.go Adds authenticated read-only web inspection of agents and terminals.
internal/​web/​session_inspector_test.go Tests authorization for read-only terminal inspection.
internal/​web/​session_finder.go Adds web saved-session search and resume routes.
internal/​web/​session_finder_test.go Tests saved search, transcript projection, resume, and confirmation behavior.
internal/​web/​server.go Registers session lifecycle and read-only inspection routes.
internal/​web/​dist/​index.html Updates embedded frontend asset references.
internal/​web/​control.go Reuses shared same-origin JSON validation for control requests.
internal/​ui/​view.go Updates footer rendering and Sessions-specific control selection.
internal/​ui/​session_start.go Implements terminal new-session drafts and verified first-send handoff.
internal/​ui/​session_start_test.go Tests draft preservation, confirmation, delayed telemetry, and layout behavior.
internal/​ui/​session_inspector.go Implements terminal linked-agent and background-terminal inspection views.
internal/​ui/​session_inspector_test.go Tests agent drill-down, transcript safety, and terminal refresh behavior.
internal/​ui/​session_finder_test.go Tests resume picker search, pagination, previews, confirmation, and handoff.
internal/​ui/​monitor.go Adds new-session controls, inspector rendering, and linked-agent targets.
internal/​ui/​monitor_summary.go Reserves monitor layout space for the New Session control.
internal/​ui/​monitor_schedule.go Removes Sessions-conflicting refresh shortcut handling from schedule controls.
internal/​ui/​monitor_queue.go Removes Sessions-conflicting refresh shortcut handling from queue controls.
internal/​ui/​monitor_queue_compact.go Removes Sessions-conflicting refresh shortcut handling from compact queue controls.
internal/​ui/​monitor_prose_test.go Tests Markdown transcript rendering and restricted-content handling.
internal/​ui/​monitor_navigation.go Adds Resume navigation to the Sessions header.
internal/​ui/​monitor_local_commands.go Routes local resume and inspection commands.
internal/​ui/​monitor_local_commands_test.go Updates local command catalogue expectations.
internal/​ui/​monitor_header_focus.go Adjusts global shortcut handling for the Sessions Resume action.
internal/​ui/​monitor_filter.go Keeps live filtering separate from saved-session search.
internal/​ui/​monitor_editor.go Adds configurable composer viewport sizing.
internal/​ui/​monitor_context.go Adds Resume picker mouse handling and shortcut updates.
internal/​ui/​monitor_context_test.go Tests Sessions shortcut behavior while viewing session detail.
internal/​ui/​monitor_context_modes.go Uses the live filter when restoring session context.
internal/​ui/​monitor_commands.go Removes conflicting refresh handling from command menus.
internal/​ui/​model.go Adds draft and inspector state, lifecycle handlers, and Sessions footer behavior.
internal/​ui/​model_test.go Updates footer geometry and view-specific control tests.
internal/​ui/​localisation_test.go Updates localized footer layout coverage.
internal/​ui/​english_snapshot_test.go Updates the English presentation snapshot for new Sessions controls.
internal/​ui/​action_review.go Adds confirmation dispatch for resume and new-session actions.
internal/​i18n/​locales/​zh-Hans.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​tr.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​sv.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​ru.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​pt-PT.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​pt-BR.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​nl.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​nb.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​ja.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​it.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​fr.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​fi.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​et.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​es.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​en-GB.json Adds English session lifecycle catalogue entries.
internal/​i18n/​locales/​de.json Adds translated session lifecycle strings.
internal/​i18n/​locales/​da.json Adds translated session lifecycle strings.
internal/​codex/​session_terminals.go Defines the background-terminal inspection capability.
internal/​codex/​session_terminals_unix.go Implements session-scoped terminal listing and sanitization.
internal/​codex/​session_terminals_unix_test.go Tests terminal inspection scope and read-only behavior.
internal/​codex/​session_start.go Defines new-session validation and lifecycle interfaces.
internal/​codex/​session_start_unix.go Implements trust checks, native thread creation, and first-turn submission.
internal/​codex/​session_start_unix_test.go Tests trusted-directory validation and first-turn outcomes.
internal/​codex/​session_settings_unix_test.go Extends daemon fixtures for lifecycle and terminal RPCs.
internal/​codex/​session_prompt_unix.go Cleans resumed-thread state when threads close.
internal/​codex/​session_history.go Centralizes history protection for restricted content.
internal/​codex/​session_history_unix.go Adds bounded history reads and child-turn ownership filtering.
internal/​codex/​session_finder.go Adds saved-session metadata search, timestamps, and resume interfaces.
internal/​codex/​session_finder_unix.go Implements account-scoped saved-session listing and resume handoff.
internal/​codex/​session_finder_unix_test.go Tests search, indexing, resume, uncertainty, and usage accounting.
internal/​codex/​session_finder_index_unix.go Adds the in-memory saved-session metadata index and prefetching.
internal/​codex/​session_commands.go Adds local /resume, /subagents, and /ps command definitions.
internal/​codex/​session_agents.go Implements linked-agent discovery and attributable transcripts.
internal/​codex/​session_agents_unix_test.go Tests descendant filtering and transcript ownership.
internal/​codex/​live_usage.go Tracks resumed threads, agent metadata, and cold-session telemetry.
internal/​codex/​daemon_status.go Extends daemon snapshots with resumed-thread state.
internal/​codex/​daemon_status_unix.go Maintains resumed subscriptions and configurable RPC timeouts.
docs/​slash-command-support.md Marks the new lifecycle and inspection commands as implemented.
assets/​screenshots/​manifest.json Updates screenshot hashes for the changed terminal presentation.

Review effort: Lite

Comment thread internal/ui/session_inspector.go Resolved
Comment thread internal/ui/session_start.go Resolved
@merefield
merefield merged commit faccbe9 into main Nov 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants