Back to catalog / Agent context
Disable session snapshots while iterating on a system prompt
Use snapshot=False in system_prompt so prompt edits apply per request, separating iteration from stable sessions.
Goal
Prevent an old session snapshot from masking prompt edits during system-prompt iteration.
Steps
- Configure
ClaudeAgentOptions.system_promptas{"type":"custom","prompt":...,"snapshot":False}or the applicable preset dictionary. [readme] - Use a fixed small prompt and comparable input for each trial; record prompt and CLI versions. [readme]
- Verify output responds to prompt edits; restore the desired snapshot policy or start a new session for stable runs. [readme]
How to verify
The two prompt versions show the expected difference on the same input, and the runtime meets the README’s CLI-version boundary.
Troubleshooting
If old behavior persists, check whether the session reuses a recorded system prompt; compare with a new session.
Permissions
Prerequisites
- Python 3.10+, SDK, and the Claude Code CLI version specified by the README or newer.
Permissions
- Do not put credentials or private data in the system prompt; the application should control prompt versions.
Limitations
Disabling snapshots is for prompt iteration, not persistence or version control; frequent edits change behavior within one session.
Pinned upstream source
- Repository
- anthropics/claude-agent-sdk-python
- File path
- README.md
- Pinned commit
b6e9d12fe1cc98dde988ab7b7713c1feeee50c6c- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification