Repository navigation
FEAT: start, resume, and inspect Codex sessions - #115
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
Includes the follow-up work from #116.
Verification