Answer prose round 1: 0 🔴, 2 🟡 (0 misread); reword the timer's docstrings, comments and help, rename the no-compaction test
This commit is contained in:
@@ -21,7 +21,7 @@ ANSWER_QUESTION = "answer the question above"
|
||||
# TALK, what the human types at loop-claude's terminal to open claude for the question, and ASK_ANSWER were picked on 2026-10-17 by a bench of three readers seated as the README's audience, as ~/.claude/CLAUDE.md → "Working loop" → "Bench a syntax with the people who write it." has it.
|
||||
TALK = "/talk"
|
||||
ASK_ANSWER = f"Answer ({TALK} opens claude, Enter stops the loop): "
|
||||
# While the human hasn't answered, the worker's session is compacted CACHE_MARGIN seconds before its hour-long prompt cache expires: compacting reads the context from the cache, while resuming after it expired writes the whole context again. Below COMPACT_FLOOR tokens of context, that write costs less than compacting. A five-minute cache expires within the margin, so it is left as it is. lilleman chose this on 2026-11-11.
|
||||
# While the human hasn't answered, the worker's session is compacted CACHE_MARGIN seconds before its hour-long prompt cache expires: compacting reads the context from the cache, while resuming after it expired writes the whole context again. Below COMPACT_FLOOR tokens of context, that write costs less than compacting. A five-minute cache expires within the margin, so a session that last wrote one isn't compacted. lilleman chose this on 2026-11-11.
|
||||
HOUR_CACHE = 3600
|
||||
CACHE_MARGIN = 600
|
||||
COMPACT_FLOOR = 60_000
|
||||
@@ -75,7 +75,7 @@ def answered(answer_here: bool, session: WorkerSession, effects: Effects) -> str
|
||||
|
||||
|
||||
def waited_answer(session: WorkerSession, effects: Effects) -> str | Stop:
|
||||
"""typed_answer, compacting the worker's session where no answer has come shortly before its prompt cache expires. The claude TALK opens compacts an idle session itself."""
|
||||
"""typed_answer, compacting the worker's session where no answer has come by CACHE_MARGIN seconds before its prompt cache expires. /talk needs no compaction: the claude it opens compacts an idle session itself."""
|
||||
entries = read_transcript(session.transcript_path)
|
||||
now = effects.now()
|
||||
delay = None if isinstance(entries, Failure) else compaction_delay(entries, now)
|
||||
|
||||
Reference in New Issue
Block a user