Skip to content

contextctl: restore native harness state for Codex, OpenCode and Pi #55

Closed

Description

@moonlight16

contextctl ctx attach / capture already record native state for Claude Code, Codex, OpenCode and Pi, but contextctl ctx restore only supports Claude Code: it rejects any other harness (cmd/contextctl/main.go, and docs/harness-attachments.md: "Manual capture and restore currently support Claude Code project state").

Goal: restore works for all four harnesses that capture supports: a captured Codex session restores into Codex, OpenCode into OpenCode, and Pi into Pi.

Scope

  • For each harness: where its native state lives, what capture records, and where restore writes it, mirroring the Claude Code path.
  • Same safety rules as Claude Code restore: no overwriting newer local state without confirmation, and paths confined to the harness's state directory.
  • Tests per harness, like the Claude Code ones.
  • Update harness-attachments.md and the README.

Out of scope: translating state between harnesses (e.g. Claude Code → Codex), which is the remaining gap for workflow 9 in rossoctl/moca's docs/concepts/context-workflows.md.

Context: rossoctl/moca#519 (docs follow-up), where the docs describe capture and restore for all four.

Activity

  1. added a commit that references this issue on Oct 16, 2026
    7951826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions