[P1] Scheduled tasks must start fresh run contexts seeded by the previous terminal output #110
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/a0-symbolics#110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
Every scheduled task occurrence must start in a fresh AgentContext. It must not reuse the full chat/model/tool history from earlier occurrences.
The only state carried into the next occurrence should be the previous run's validated terminal output, supplied explicitly as bounded input alongside the current task prompt.
This is a separate lifecycle contract from #107 (wrong history truncation) and #108 (deadlines and terminal-result validation).
Current behavior
helpers/task_scheduler.py:
Because context_id normally equals the durable task UUID, every scheduled occurrence inherits all previous model messages, tool outputs, response IDs, temporary loop state, and context growth.
The live hackmode-rage-worker reached 702 history messages, 342 iterations, 341 provider response IDs, and only 7 response-tool completions. Reusing that history also exposed the oldest-first truncation in #107.
Required behavior
Keep durable task identity separate from per-occurrence run identity:
Acceptance criteria