Skip to content

codex: expose enable_state_persistence for agentapi state persistence #783

Description

@mafredri

Problem

The codex module doesn't expose enable_state_persistence or pass it through to the module "agentapi" block. Without this, the Coder UI won't preserve chat history across workspace restarts even though the agent itself resumes its session via resume <SESSION_ID>.

The --type codex gap was fixed in #781. This ticket covers the remaining state persistence work.

Desired outcome

Expose enable_state_persistence in main.tf (default true) and pass it through to the module "agentapi" block so the Coder UI preserves chat history across restarts, matching the agent's resumed session.

Version bump

patch

Refs #740
Refs coder/internal#1258

Activity

  1. added theissue type on Mar 3, 2026
  2. 35C4n0r commented on Mar 3, 2026

    @35C4n0r
    Collaborator

    @mafredri, when you make a PR for this can you include this patch: https://gist.github.com/35C4n0r/75114df2e90a4306cd9f5c2fe3e29a58
    It's a documentation detail I missed in #781

  3. mafredri commented on Mar 3, 2026

    @mafredri
    MemberAuthor

    @35C4n0r if you have the bandwidth and want to take this ticket on and fix that one at the same time, feel free. Otherwise, got it 👍🏻.

  4. self-assigned this
    on Mar 4, 2026
  5. added a commit that references this issue on Mar 5, 2026
    f1748c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions