TUE, AUGUST 25, 2026
Independent · In‑Depth · Practitioner‑Tested
Claude Coding

Claude Code Prompts: 6 for Long Autonomous Sessions

Claude Code ranks first among agent harnesses for long autonomous sessions, and it is bundled with Claude Pro at 20 dollars rather than sold separately. These six prompts are built for sessions where you hand over a task and come back later. They lean on the finding that reviewer engagement predicts whether an agent pull request merges, and that large diffs merge less often than small ones.

⌨️ 6 prompts 🕐 Updated Aug 25, 2026
💡 How to use these prompts: Replace everything in [BRACKETS] with your specific details before sending. Click Copy to copy any prompt to your clipboard instantly.
1
Cap the diff before you start
Large diffs measurably merge less often. Capping scope up front is the single highest-leverage instruction for agent work.
Task: [DESCRIBE]

Constraints for this session:
- No single commit may touch more than 5 files
- If the change needs more than that, stop and propose a split instead
- Do not refactor anything outside the scope of the task
- Do not reformat files you are not otherwise changing

If you find something broken that is out of scope, note it at the end rather than fixing it.
2
Set up a checkpoint you can actually review
Reviewer engagement is the strongest predictor of an agent pull request merging. A checkpoint creates the engagement.
Work on [TASK] and stop at the first point where I need to make a judgement call.

At that checkpoint, give me:
- What you have done so far, in one paragraph
- The decision you need from me, stated as options rather than an open question
- What you will do next under each option

Do not proceed past the checkpoint without an answer.
3
Reproduce the bug before fixing it
Forces the model to demonstrate understanding rather than pattern-matching to a plausible-looking fix.
Bug report: [PASTE]

Before proposing a fix:
1. Write a failing test that reproduces it
2. Show me the test failing
3. Explain what the code is actually doing versus what it should do

Only then propose the fix, and show the same test passing.

If you cannot reproduce it, say so and tell me what information you would need.
4
Write the commit message a reviewer needs
The last two lines are what makes it useful. Most generated commit messages restate the diff in prose.
Write a commit message for the change you just made.

Structure:
- One line summary under 60 characters
- Blank line
- What changed and why, not how
- Anything a reviewer should look at closely
- Anything you were unsure about

Do not describe the diff. I can read the diff. Tell me what I would not know from reading it.
5
Audit a workflow file for injection risk
Written after the Snowflake workflow injection and the Ray CVE, both of which came down to untrusted input reaching a shell.
Review the CI workflow file below for these specific issues:

1. Untrusted input expanded directly into a run block. Issue titles, PR titles, branch names, comment bodies
2. Sanitisation applied after template expansion rather than before
3. Conditionals referencing one event context on a workflow triggered by another
4. Tokens with broader scope than the workflow needs

For each finding, show the safe rewrite.

File:
[PASTE]
6
Hand off a session to your future self
The last line is the point. Long sessions end and the context does not survive. This is what you paste at the start of the next one.
Before this session ends, write a handoff note covering:

- What the task was and where it stands
- Decisions made and why, especially ones a reasonable person would question
- What is deliberately unfinished
- Anything you learned about this codebase that is not obvious from reading it
- The first thing the next session should do

Write it for someone with no memory of this conversation.