Skip to content

Durable mode: checkpoint validation fails with 'damaged or redacted' on first Copilot run #78853

Done

Description

@eedorenko

Description

Durable mode (engine.durable) fails on the very first run of a Copilot workflow with:

Error: Durable artifact was damaged or redacted; refusing continuation or publication
    at durable_files.cjs:122

The Copilot CLI executes successfully (exit code 0, produces a session ID), but the post-execution "Validate durable checkpoint artifact" step rejects the session files. This happens because the "Redact secrets in logs" step strips secrets from the session state files, corrupting them for resumption purposes. The validator then correctly detects the files are damaged.

Reproduction

Workflow frontmatter:

engine:
  id: copilot
  durable:
    retention-days: 7

Compiler: gh-aw v1.2.2
Runtime: v1.0.103, AWF v0.29.11
Run: https://github.com/eedorenko/agentic-factory-v2/actions/runs/44148915265

Observed Behavior

Step execution order and results:

  1. Restore durable workflow state — status: fresh (first run, no prior checkpoint)
  2. Execute GitHub Copilot CLI — exit code 0, 30s run, produces Resume copilot --resume=6f9f1648-...
  3. Collect Copilot durable session files — runs durable_session.cjs capture-copilot
  4. Stage durable session files — durable_files.cjs stageFiles()
  5. Redact secrets in logs — redact_secrets.cjs strips secrets from /tmp/gh-aw/ including durable session files
  6. Validate durable checkpoint artifact — durable_files.cjs validateFiles() FAILS: "damaged or redacted"

The Copilot CLI session state inherently contains token/credential values from the conversation context (tool configurations, API endpoints). When the redactor strips these, the session JSON becomes structurally corrupt and unusable for resumption.

Expected Behavior

Durable checkpoint should be saved successfully so the next run can restore the session via --session-id.

Possible approaches:

  • Copilot CLI could separate credentials from session state (externalize secrets, reference them by ID)
  • The redactor could exclude durable session files from secret scrubbing (with appropriate access controls)
  • Session files could use a sealed/encrypted format that bypasses heuristic redaction

Environment

  • gh-aw CLI: v1.2.2
  • Runtime: v1.0.103
  • AWF: v0.29.11
  • Copilot CLI: version on runner as of 2026-11-17
  • Repository: public (with min-integrity: none)
  • Runner: ubuntu-latest

Activity

  1. eedorenko commented on Nov 17, 2026

    @eedorenko
    Author

    @pelikhan, could you please have a look at this? I was playing with durable workflows and hit the wall.

  2. locked and limited conversation to collaborators on Nov 17, 2026
  3. unlocked this conversation on Nov 17, 2026
  4. locked and limited conversation to collaborators on Nov 17, 2026
  5. unlocked this conversation on Nov 17, 2026
  6. eedorenko commented on Nov 19, 2026

    @eedorenko
    Author

    @pelikhan the fix from #78855 didn't resolve this. Still getting Durable artifact was damaged or redacted; refusing continuation or publication on the first durable run (no prior checkpoint to restore).

    What I tried:

    1. Recompiled with latest CLI → new checkout-at-HEAD pattern has a separate bug (Post Setup Scripts fails because repo checkout overwrites ./actions/setup path)
    2. Manually pinned setup action to fix commit 57db981 (confirmed new durable_files.cjs is used — line numbers shifted from 122→126)
    3. Same error persists

    Run: https://github.com/eedorenko/agentic-factory-v2/actions/runs/44614945212
    Workflow: executor-durable.md with engine: { id: copilot, durable: { retention-days: 7 } }

  7. locked and limited conversation to collaborators on Nov 19, 2026
  8. unlocked this conversation on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions