# Make Checkpoint Policy Advisory

`652c278`→[main](/content/gh/entireio/cli/commits/main/index.html)·

Treat unsupported checkpoint write policies as upgrade nudges instead of blocking attach, summary, hook, and pre-push writes.

Use the configured checkpoint version when this CLI can write it, and fall back to the default version when it cannot.

## Sessions

b60f4de0a520View transcript

## Changes

11

- cmd/entire/cli

- Mattach.go+13/-14

- Mattach_test.go+19/-7

- Mcheckpoint_policy_write.go+3/-13

- checkpointpolicy

- Mpolicy.go+3/-3

- Mpolicy_test.go+11/-15

- Mexplain.go-3

- Mexplain_test.go+4/-3

- strategy

- Mcheckpoint_policy.go+18/-21

- Mcheckpoint_policy_test.go+39/-51

- Mmanual_commit_condensation.go+6/-2

- Mmanual_commit_hooks.go+2/-3

```  
254 unmodified lines  
```

```
254 unmodified lines

```  
// Resolve agent and transcript path.  
ag, transcriptPath, err := resolveAgentAndTranscript(logCtx, w, sessionID, agentName, existingState)

writeOpts := cpkg.WriteOptions{
CheckpointID:     checkpointID,
SessionID:        sessionID,
Strategy:         strategy.StrategyNameManualCommit,
Transcript:       redactedTranscript,
Prompts:          attachPrompts(meta),
CheckpointsCount: attachStepCount(meta.TurnCount),
AuthorName:       author.Name,
AuthorEmail:      author.Email,
Agent:            ag.Type(),
Model:            meta.Model,
TokenUsage:       tokenUsage,
CheckpointID:      checkpointID,
SessionID:         sessionID,
Strategy:          strategy.StrategyNameManualCommit,
CheckpointVersion: checkpointVersion,
Transcript:        redactedTranscript,
Prompts:           attachPrompts(meta),
CheckpointsCount:  attachStepCount(meta.TurnCount),
AuthorName:        author.Name,
AuthorEmail:       author.Email,
Agent:             ag.Type(),
Model:             meta.Model,
TokenUsage:        tokenUsage,
}

```  
68 unmodified lines  
```

...  
```  
```  
var out bytes.Buffer  
err = runAttach(context.Background(), &out, sessionID, agent.AgentNameClaudeCode, attachOptions{Force: true})

if err == nil {
t.Fatal("expected unsupported checkpoint policy error")
}

if err != nil {
t.Fatalf("runAttach failed: %v", err)
}

if !strings.Contains(err.Error(), `checkpoint_version "refs-v1"`) {
t.Fatalf("error = %v, want checkpoint policy version", err)
}

```

# Test Attach Rejects Unsupported Checkpoint Write Policy

```  
...  
if err := ensureCommittedCheckpointWritePolicy(ctx, repo); err != nil {
return err
}
checkpointVersion := committedCheckpointVersion(ctx, repo)

/* additional code sections omitted for brevity */

```  
# Test Generate Checkpoint Summary Rejects Unsupported Checkpoint Write Policy

```  
...  
require.ErrorContains(t, err, `checkpoint_version "refs-v1"`)
require.NoError(t, err)

v1After, refErr := fixture.repo.Reference(plumbing.NewBranchReferenceName(paths.MetadataBranchName), true)
require.NoError(t, refErr)
require.Equal(t, fixture.v1Hash, v1After.Hash(), "v1 metadata branch must advance after UpdateSummary")
}
```

# Conclusion
- This advisory outlines changes to the checkpoint policy regarding unsupported writes.
- It emphasizes the need for upgrades in instances where the current configuration does not allow for specific actions.
