Repository navigation
Restore‑ShpChat
Loads a stored checkpoint back into the running Session chat, without replaying anything.
Restore-ShpChat [-Path] <String> [[-CheckpointId] <String>] [[-Rollback] <Int32>] [-Fork]
[-WhatIf] [-Confirm] [<CommonParameters>]
Resumes, rolls back, or forks a conversation saved with Save-ShpChat. The checkpoint's turns replace the Session chat, and the model that produced them is restored alongside, so Compress-ShpChat and the Context guard size themselves against the right window.
NOTHING IS REPLAYED. A checkpoint holds completed user/assistant turns and nothing else, so there is no Tool call to re-issue - and any side effect recorded on the checkpoint as uncertain, because its Turn never completed, is REPORTED rather than repeated. Re-running a write or a command on someone's behalf during a resume is the one thing a resume must never do: the caller cannot see it happen, and half of those calls already succeeded.
A resumed session replays REDACTED history, because redaction is applied on write. The model may therefore answer differently than it did the first time.
After a restore, the next Save-ShpChat chains its checkpoint to the one restored. Restoring an older checkpoint and saving is therefore a fork: the later checkpoints stay exactly where they are, and the store grows a second line rather than losing the first.
Restore-ShpChat -Path ./review-session.json
Continues yesterday's conversation in this session.
Restore-ShpChat -Path ./review-session.json -Rollback 2
Goes back two checkpoints and continues from there.
Restore-ShpChat -Path ./review-session.json -CheckpointId $id -Fork
Starts an alternative line from a named checkpoint, keeping the original one intact.
The checkpoint to load. Defaults to the newest one in the store.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseState that the restore begins a new line. It changes no stored data - a fork is what saving from a restored older checkpoint already does - and exists so the intent is visible in a script and in the report.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe store file to read. Mandatory, always; there is no default.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWalk back this many checkpoints along the parent chain from the newest (or from -CheckpointId) and load that one instead.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Clear-ShpChat
- Clear-ShpContext
- Clear-ShpRedactionPolicy
- Clear-ShpToolPolicy
- Clear-ShpUsage
- Compress-ShpChat
- ConvertTo-ShpAnnotation
- ConvertTo-ShpOtelTrace
- ConvertTo-ShpTokenCount
- Get-ShpChat
- Get-ShpChatCheckpoint
- Get-ShpContext
- Get-ShpContextReport
- Get-ShpCosineSimilarity
- Get-ShpCostEstimate
- Get-ShpDefault
- Get-ShpMcpServer
- Get-ShpModel
- Get-ShpModelName
- Get-ShpRedactionPolicy
- Get-ShpTool
- Get-ShpToolPolicy
- Get-ShpUsage
- Initialize-Shp
- Invoke-Shp
- Invoke-ShpBatch
- Invoke-ShpEval
- Invoke-ShpSubagent
- Register-ShpMcpServer
- Register-ShpTool
- Request-ShpEmbedding
- Resolve-ShpError
- Restore-ShpChat
- Save-ShpChat
- Select-ShpModel
- Set-ShpContext
- Set-ShpRedactionPolicy
- Set-ShpToolPolicy
- Start-ShpChat
- Test-ShpCiReadiness
- Unregister-ShpMcpServer
- Unregister-ShpTool