Conversation
|
Hey Nate — friendly ping on this one after a month, since it's been quietly earning its keep over here. We've been running this patch in production on two Macs since early August — every If you'd rather see the contract handled differently — say, injecting the filename from No rush at all; the fork is easy to maintain. Mainly flagging it because the bug still bites anyone trying 🤖 Generated with Claude Code |
The one-request manifest's check requires a non-empty answer.md (expect_files declares it too), but the packet preamble never instructs the worker to create any file — it says 'return only the answer'. With max_attempts=1 the retry that would surface the filename in failure context never fires, so every real-engine ask fails attempt 1 with 'missing expected files: answer.md'. The unit tests mask this: their mock worker writes answer.md unconditionally. Fix: one sentence in the preamble naming the contract file. Verified with the opencode engine (GLM-5.2): FAIL before, PASS after. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
631feac to
7d7b9d1
Compare
Fixes #102.
The
askpacket preamble never tells the worker about theanswer.mdcontract that the check (test -s answer.md) andexpect_filesdemand — and withmax_attempts=1the retry that would surface the filename never fires. Any engine that answers inline (i.e. all of them, absent an instruction to write a file) fails every run. The existing tests can't catch it because their mock worker writesanswer.mdunconditionally.Change: one sentence in the preamble instructing the worker to write the final answer to
answer.mdand also print it. The print keeps the raw-output/token-regex path unchanged.Verified: opencode engine,
openrouter/z-ai/glm-5.2— deterministic FAIL before (two runs, both machines), PASS after (both machines; worker tool-calls the file write on attempt 1). Existingtest_ask_command.pysuite unaffected since the mock worker path doesn't parse the preamble.🤖 Generated with Claude Code