Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .agents/scripts/supervisor-archived/pulse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2949,7 +2949,7 @@ cmd_pulse() {
elif [[ -x "$legacy_task_creator" ]]; then
task_creator_script="$legacy_task_creator"
fi
local task_creation_cooldown_file="${SUPERVISOR_DIR}/task-creation-last-run"
local task_creation_cooldown_file="${SUPERVISOR_STATE_DIR:-/var/lib/supervisor}/task-creation-last-run"
local task_creation_cooldown=86400 # 24 hours
if [[ -n "$task_creator_script" ]]; then
local should_run_task_creation=true
Expand All @@ -2973,7 +2973,6 @@ cmd_pulse() {

if [[ "$should_run_task_creation" == "true" ]]; then
log_info " Phase 10b: Auto-creating tasks from quality findings"
date +%s >"$task_creation_cooldown_file"

# Determine repo for TODO.md
local task_repo=""
Expand Down Expand Up @@ -3104,6 +3103,10 @@ cmd_pulse() {
log_verbose " Phase 10b: No new tasks to create"
fi
routine_record_run "task_creation" "$tasks_added" 2>/dev/null || true
# Write cooldown timestamp only after TODO.md confirmed present and
# task creation has run (prevents throttling retries on failures).
mkdir -p "$(dirname "$task_creation_cooldown_file")" 2>/dev/null || true
date +%s >"$task_creation_cooldown_file"
fi
fi
fi
Expand Down
Loading