Skip to content

feat: import existing sessions and restore Codex runtime UI#518

Draft
duxiaoxiong wants to merge 7 commits intotiann:mainfrom
duxiaoxiong:feat/import-existing-sessions
Draft

feat: import existing sessions and restore Codex runtime UI#518
duxiaoxiong wants to merge 7 commits intotiann:mainfrom
duxiaoxiong:feat/import-existing-sessions

Conversation

@duxiaoxiong
Copy link
Copy Markdown

Summary

This draft PR adds import and runtime restoration support for existing agent sessions, with a focus on Codex parity in HAPI's web UI.

  • Import existing Codex/Claude sessions from local transcripts and mark already-imported sessions.
  • Preserve Codex runtime config when importing/resuming, including model, reasoning effort, permission mode, collaboration mode, and service tier when available.
  • Surface Codex runtime config in session summaries/status UI.
  • Restore Codex subagent display for spawn/wait flows, including multiple concurrent subagents, nickname propagation, and lifecycle status updates.
  • Hide HAPI title-tool plumbing from visible chat while allowing Codex/native title updates to update session metadata.
  • Improve subagent preview cards so the nickname is primary, with stable per-agent accent colors.

Why

Imported Codex sessions previously restored message history but lost the active runtime configuration, so continuing an imported session could silently fall back to default reasoning/model behavior. Codex subagent events also arrived in a different shape than classic tool forwarding, so multi-agent spawn/wait output could show stale or incomplete UI state.

Validation

  • bun run typecheck
  • bun run test
  • bun run build
  • Browser smoke test against a temporary local HAPI runtime:
    • created a Codex session
    • spawned two Codex child agents
    • waited for both to complete
    • verified both subagent cards showed nickname-first UI and Completed status

Notes

This is a draft PR because the diff spans import plumbing, runtime config propagation, and Codex subagent UI. Happy to split or trim scope if preferred.

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.

1 participant