Skip to content

Regression: PreCompact hook still returns invalid JSON in Codex #66

@intel352

Description

@intel352

Summary

Codex reported the PreCompact hook failure again after the previous issue was closed.

Observed output in this session:

PreCompact hook (failed)
  error: hook returned invalid PreCompact hook JSON output

This appears to be a regression or an uncovered path for the behavior tracked in #41.

Context

  • Host: Codex
  • Plugin: autodev, current local cache includes autodev/6.2.2
  • Workspace: /Users/jon/workspace
  • Date observed: 2026-06-01
  • The error appeared during an active autonomous workflow-compute session around context compaction.

Why it matters

PreCompact is part of the safety/continuity path for long autonomous sessions. If the hook emits invalid JSON, Codex treats the hook as failed and the session may lose or mistrust the intended compaction checkpoint state.

Requested follow-up

  • Re-check the Codex PreCompact hook path, not only the Claude wrapper path.
  • Add a regression that executes the installed hook the same way Codex invokes it and asserts stdout is valid PreCompact JSON.
  • Ensure all diagnostics, locale warnings, shell warnings, helper output, and wrapper notices stay off stdout.
  • Confirm the fix covers the installed plugin layout, not just the source-repo test layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions