ForkFree

Prompts / Agents and automation

Compact a Session With Residual Memory

You get a short summary plus a checked list of the exact details a normal summary tends to drop. It works because the second pass looks for gaps against the work still to come, instead of just shortening the text.

Worked in our testThe reply followed every step and the output format. The summary is about 80 words, there are 5 correctly tagged residual lines, all verifiable against the history, and it ends with a single risk line. It captured the exact flag, the rejected 500-row batch size and why, the 200-row batch size with 1.5s pause, order 48213, and Priya's UK date format.

The prompt

You are a meticulous project handover editor who compresses long working sessions without losing details that matter later.

Task: Compact the session history below into a short summary plus a "residual memory" list that keeps exact details the summary leaves out.

Session history:
{session_history}

Existing summary:
{existing_summary}

Upcoming work:
{next_task}

Steps:
1. Read the existing summary and note what it already covers.
2. Scan the history for omitted details the upcoming work could depend on: exact values, file names, commands, rejected options and why, unresolved errors, user preferences.
3. Discard anything the upcoming work cannot plausibly need.
4. Write each remaining detail as one self-contained line that makes sense without the history.
5. Check every line against the history and delete any you cannot verify.

Output:
Two sections. "Summary": the existing summary, edited to under 120 words. "Residual memory": a bulleted list of at most 10 lines, each tagged [value], [decision], [error] or [preference]. Finish with one line naming the biggest risk of a remaining gap.

Change the parts in curly braces. Use it when a long chat or agent session is about to be cut down to fit the context window, or handed to someone else.

What happened when we ran it

We sent

You are a meticulous project handover editor who compresses long working sessions without losing details that matter later.

Task: Compact the session history below into a short summary plus a "residual memory" list that keeps exact details the summary leaves out.

Session history:
We spent the afternoon migrating the shop's order export from CSV to JSON. The export script is export_orders.py and must run with --since 2026-01-01, otherwise it times out on the full table. We tried batching at 500 rows but Shopify's API returned 429 errors, so we settled on 200 rows with a 1.5 second pause. Priya said she wants dates kept in UK format (DD/MM/YYYY) in the finance sheet. The last run failed on order 48213 because the postcode field was null, and we have not fixed that yet.

Existing summary:
The order export is being moved from CSV to JSON using export_orders.py. Batching was tuned to avoid API rate limits. One run failed and still needs investigating.

Upcoming work:
Fix the failing order, then run the full export for 2026 and send the finance sheet to Priya.

Steps:
1. Read the existing summary and note what it already covers.
2. Scan the history for omitted details the upcoming work could depend on: exact values, file names, commands, rejected options and why, unresolved errors, user preferences.
3. Discard anything the upcoming work cannot plausibly need.
4. Write each remaining detail as one self-contained line that makes sense without the history.
5. Check every line against the history and delete any you cannot verify.

Output:
Two sections. "Summary": the existing summary, edited to under 120 words. "Residual memory": a bulleted list of at most 10 lines, each tagged [value], [decision], [error] or [preference]. Finish with one line naming the biggest risk of a remaining gap.

The model replied

## Summary The shop's order export is being migrated from CSV to JSON using `export_orders.py`. Batching was tuned to avoid Shopify API rate limits (429 errors), settling on smaller batches with a pause between them. The most recent run failed on a single order because of a null field, and that failure is still unresolved. Next steps are to fix the failing order, run the full 2026 export, and send the finance sheet to Priya. ## Residual memory - [value] Run the script as `export_orders.py --since 2026-01-01`; without `--since` it times out on the full table. - [value] Working batch settings: 200 rows per batch with a 1.5 second pause between batches. - [decision] Batch size of 500 rows was rejected because Shopify's API returned 429 (rate limit) errors. - [error] The last run failed on order 48213 because its postcode field was null; this has not been fixed. - [preference] Priya wants dates in UK format (DD/MM/YYYY) in the finance sheet. **Biggest risk of a remaining gap:** If the null-postcode handling isn't fixed (or other orders also have null postcodes), the full 2026 export will fail again or deliver an incomplete finance sheet to Priya.

Run on Claude Sonnet 5.5, 06 Nov 2026. Automatic check: 5 out of 5.

Mentioned for

Claude, ChatGPT, Gemini

Where it came from

Found on GitHub, shared by fudan-generative-vision: fudan-generative-vision/Remory.

This is our own version of the idea, written and tested by us. The original may differ.

More agents and automation prompts

Agents and automation Partly worked
Rewrite Agent Rules With Explicit Exceptions

You get a cleaner set of agent instructions where risky actions have a clear approval gate instead of a vague ban, plus progress updates and a cap on helpers. It works because models tend to treat "never" as absolute, so spelling out the exception avoids both blocked work and unsafe guesses.

Found on Web, shared by Anthropic (official docs)
Agents and automation Worked in our test
Make the AI Finish Every Task

You get every item on a list finished properly, instead of a few done and the rest left as suggestions. It works because it sets the depth of thinking up front, defines "done" as real deliverables, and makes the model count its work before replying.

Found on Web, shared by Moritz Kremb (@moritzkremb)
Agents and automation Worked in our test
Audit Subagents Before Folding Them

You get a verdict for each subagent, backed by evidence and a test, plus a safe order for making changes. It works because it forces a measured decision per subagent instead of a blanket rewrite.

Found on GitHub, shared by anthropics