Commit Graph
1 Commits
Author SHA1 Message Date
William WANG b76a577567 factory: ZCode's restored-read reminder reaches Factory renamed, not refused (#213, William-AIdev)
Factory refuses the fixed "Called the Read tool with the following input:" opening. ZCode restores a pre-compaction read as one reminder carrying the arguments and the file's text, a shape no adapter matched, so it reached Factory unchanged (403). This renames that opening, as COMPACT_READ already does for Claude Code's arguments-only reminder, and adapts the file text as a read result.

Reviewed at d2d81da0, merged onto main a06512e (clean):
- On main a06512e (factory 0.1.40), a probe through _internal.droidBody still sends the restored reminder with the phrase unchanged; the PR's 5 new tests are 3 fail / 2 pass there.
- With the PR: `bun test` in packages/factory (sandbox HOME, on mote): 183 pass, 0 fail. `bun scripts/check.mjs factory`: ok.
- Broken by hand: dropping the restoredReadText call turns 3 of the 5 new tests red; keeping the file text raw (no quotedToolText) turns the encoding test red.
- Not tried: a live Factory account (the PR body records 403 -> 200 on Messages and Responses).

The version bump (factory 0.1.41) follows on main.
2026-10-29 21:07:24 +08:00