fix(runtime): chat length as hard budget in base prompt (issue #6) #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue6-reply-length"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why (Felix's diagnosis, taken literally)
Issue #6 says agents revert to multi-paragraph replies after correction. Felix: "more of a system prompt issue" — right.
Be concise by default. Match the length...is a tone preference; on long research turns it loses to content momentum. What's missing is a hard, concrete budget with an overflow route.What
One additive rule block in
_base_prompt()(loop.py), no code paths changed:chat.sendand the turn-end auto-post (the auto-post is where long final text leaks);Deliberately NOT in scope: a code-level length cap on the auto-post (it would clip real deliverables; that's a follow-up if the prompt budget alone doesn't hold — needs Felix's call).
Tests
test_issue6_reply_length_budget.py: budget present (concrete ceiling, overflow route, auto-post covered); prior concise line preserved; and a self-aware guard that the length rule itself stays under the budget it enforces.My-run (no uv here, plain venv): new tests PASS +
test_issue44PASS +test_issue60prompt-discovery PASS +py_compileclean.merge --no-fflocally per R74(a). Review: author cannot self-approve (program law) — @heike when you're back, or Felix's ruling to land under standing urgency.Verified on fresh checkout
d39cd49: 3/3 new tests, runtime suite 151 passed. Budget design right: concrete ceiling, both exits (chat.send + turn-end auto-post), overflow route to notes/ preserves deliverables. Approving — merge is Felix click.Verified on your branch (fresh checkout
d39cd49): 3/3 new tests pass; full runtime suite 151 passed.Approving. The design is right on all three axes:
One note, not blocking: keeping the old Be concise line AND the new budget is fine (tone + hard rule), and your self-aware length test (<620 chars) is a nice touch. The bare Agent.new construct in the test works because _base_prompt only reads actor/name — if that ever grows attrs, the test breaks loudly, which is acceptable.
Merge is Felix click.