Kept everything, or never looked
Sluice can hand your photos to an AI agent to judge. It lays them out in grids of 25 photos, each grid one image called a sheet, and the agent writes back a small decisions file per sheet. Photos it sets aside move to folders for you to look at later, and the rest stay where they are. That step is called a sift.
The agent can be your own, or a paid model that Sluice calls for you. Both write the same decisions file, and the same check reads it before anything moves.
This entry is about two records Sluice relies on, each of which could mean two different things. The first was the decisions file. The second, found about a month earlier, was a crash log. Both were fixed before release by a different AI agent, the one that writes Sluice’s code.
An empty list
The decisions file used to list only the photos to move. Anything not listed stayed. So a sheet whose 25 photos were all keepers came back like this:
{"montage":"montage-001","decisions":[]}
montage-001 is the sheet’s name in the file. The empty list meant “I judged all 25 and kept
them”. It also meant “I never opened this sheet”. Nothing in the file could tell the two apart.
An agent that wrote an empty list for every sheet would have produced a run that passed the check, applied cleanly, moved nothing and reported success. Doing the work and skipping it left the same file.
The paid route already guarded against this, in its own code. Sluice asks that model about each photo by number. A reply that skipped a number was refused, and Sluice paid for a retry. But that rule lived in the paid route alone. The check both routes share couldn’t enforce it, because the file gave it nothing to count against.
The gap surfaced during a hands-on walkthrough, on the button that copies instructions for your own agent. Reading what that button produced, I asked why the two routes behaved differently at all. The coding agent read the paid route’s code end to end, and that answered it.
A verdict per photo
The fix makes the file name every photo on the sheet, keepers included:
{"file": "<path>", "action": "keep"}
{"file": "<path>", "action": "junk", "reason": "photo of a receipt"}
The shared check now refuses a sheet that leaves any photo unjudged, on either route. A keep is a separate type in the code from a decision that moves a photo. The check strips the keeps before anything that moves files sees the list. A keep that somehow reached that step wouldn’t compile.
Two other ways out were turned down. One was a field saying how many photos had been reviewed. An agent can copy that number out of the sheet’s own data without opening the sheet. And when a sheet comes back wrong, a count can’t say which photo to send back to the agent. The other way out was stronger wording in the instructions alone. That leaves the rule in one route’s code for good.
The change had a cost. Tightening the check meant a run could now stop on a sheet that came back incomplete. So Sluice needed a way back, handing those sheets to the agent again without throwing away the rest of the run. The work came in at more than twice its planned size.
It also opened a new hole. Sluice already refused a file that names the same photo twice, since two instructions for one photo contradict each other. But that check only counted entries that move a photo. Before keeps, every entry moved one, so a photo named twice was always caught. Now a file could say “keep” for a photo and “junk” for the same photo. The check saw only one move, so it passed, and the photo would have gone to junk although the file also said keep. A separate review agent caught it before the change was committed. The check now counts every entry, keeps included.
The helper that got one paragraph
A later walkthrough tested the new format with a real AI agent. It was given the instructions, and it passed the job to a helper agent. The helper received only the opening paragraph.
It managed anyway. It found the photo lists and the category names in the run’s own files, and wrote ten well-formed decisions files. Not one of them listed a keep, because that rule sat in the part of the instructions it never received.
Under the old format all ten would have passed. Applying the run would have moved 104 photos. Nothing in the files would have shown whether the agent looked at the other 139. The result would have read exactly like a sift that judged everything and kept 139. Under the new format each of those files leaves photos unaccounted for, so the check refuses it.
The instructions had invited that shortcut. Their opening paragraph ended on “Each sheet needs a decisions file of its own”, which reads like a complete job. Everything that makes the job doable came after it. Both versions of the instructions, the first one and the follow-up for sheets that came back wrong, now carry this right after their opening:
Everything below is the contract those files have to meet. Read it before you start, and if you hand this work to another agent, hand it this whole message rather than a summary of it.
In a second round the agent delegated again and passed the whole message on. That suggests the sentence works, but it doesn’t prove it. The second round used the follow-up instructions, not the first ones.
That walkthrough was also the first time the new format ran end to end on real photos. Nine sheets came back with 218 photos judged: 107 keeps, and 111 photos for Sluice to act on. The record it wrote of what to do held exactly those 111, and not one keep. The keeps stopped at the check, as designed.
The crash log that couldn’t tell
The same flaw had shown up about a month earlier, in the step that moves the photos.
That step can crash halfway, and the next run has to pick up where it left off. Its first log for resuming, replaced before release, was written after each photo moved. A crash between the move and the log write left no entry. So a missing entry meant either “moved, but the log write was lost” or “never moved”. The next run had no way to tell which.
The log was replaced by one written before each move. Each record names the exact destination, after any name clash has been resolved, and the hash of the file being moved. A hash is a fingerprint of the file’s bytes. A resumed run checks the one recorded path against that fingerprint, instead of guessing where the file might have gone.
Even a log written first can be lost or damaged. Then Sluice rebuilds it. For each photo the run meant to move, it looks in the destination folder, finds the photo there, and writes its record again.
The first version of that rebuild looked each photo up by name. Say the run moved IMG_0412.jpg
into the folder for funny photos. That one folder collects files from every run Sluice has ever
applied, so an older, unrelated IMG_0412.jpg may already be sitting there. The rebuild could take
that older photo for this run’s and write it into the log as a trusted record. A review agent
caught it.
So the rebuild now counts before it trusts. When a name is already taken, Sluice gives the newcomer
a numbered name, like IMG_0412 (2).jpg. The rebuild counts the files of that name in the folder,
the plain one and its numbered versions. Then it compares that with how many photos of that name
the run moved there. If the counts match, every file is accounted for and the records are written. If they
don’t, it can’t tell which file is which, so it writes nothing for that name and reports those
photos as missing. In the example, the folder holds two IMG_0412 files and the run moved one, so
the rebuild refuses rather than guess. Sluice then tells you “A photo this sift wants to move
is not where it was”, with two buttons: Look again and Go on without this photo. Going on
leaves the file exactly where it is, and the run simply stops trying to act on it. So a refusal
that wasn’t needed costs you one click, which is cheap next to a log that names the wrong photo.
Making the decisions files crash-safe hit the same problem: one outcome standing in for two. Sluice started writing them to a temporary file first, then renaming it into place, so a crash can’t leave half a file. The first version deleted the temporary file whenever anything went wrong, treating two failures as one. A write that fails partway leaves garbage. A rename that fails leaves a complete file, and on the paid route that file was a reply from a model somebody had paid for. The old write, straight to the destination, could never have lost it. A review agent caught it, and now the temporary file is deleted only when the write itself failed. A failed rename keeps it.
Write the fact down first
Both fixes work the same way. A keep is written down as a keep, so an empty list can no longer stand in for one. A move is written down before it happens, so after a crash the next run reads where the photo went rather than inferring it.
Neither old version failed while things went normally. What each got wrong was what its silence meant. A record that only says what happened leaves “nothing happened” and “nothing was recorded” looking the same. Both records now say which.