Skip to content

Workflow: Self-development cron spawners lack resilience and quality controls #287

@axon-agent

Description

@axon-agent

🤖 Axon Agent @gjkim42

Summary

Analysis of the self-development TaskSpawner configs reveals several workflow gaps beyond the missing TTL/maxConcurrency (addressed in #286). These are deeper patterns that affect the reliability and quality of autonomous agent workflows, particularly for cron-based spawners.

Problems Identified

1. Cron deduplication prevents retry after failure

Code reference: internal/source/cron.go:45, cmd/axon-spawner/main.go:148-152

The cron source generates task IDs from the trigger timestamp (YYYYMMDD-HHMM). The spawner deduplicates by checking if a task with that name already exists. This means:

  • If a cron task fails, the spawner still sees it as "already created" and skips it
  • The failed task blocks any retry until the next cron tick (12 hours for strategist, 24 hours for fake-user)
  • Even with TTL cleanup (proposed in Add TTL and maxConcurrency to cron-based self-development spawners #286), there's a window where the task exists but has already failed

Possible improvements:

  • Option A: Only deduplicate against non-terminal tasks (skip Succeeded/Failed tasks in the existence check)
  • Option B: Add a retryPolicy field to TaskTemplate that controls whether failed tasks should be retried
  • Option C: Clear the dedup name after TTL cleanup (already happens naturally, but the gap between failure and TTL expiry is the issue)

2. No mechanism to skip a cron run when there's nothing to do

Code reference: self-development/axon-fake-strategist.yaml:33-58, self-development/axon-fake-user.yaml:32-48

Both cron prompts say "Pick ONE area to focus on" but provide no guidance for when the agent has nothing meaningful to contribute. The agent always runs, always incurs API costs, and may create low-value output. Current prompt constraints say "Do not create duplicate issues" but don't say "If you can't find anything new, exit cleanly without creating issues."

Possible improvements:

  • Add to prompts: "If after reviewing existing issues you cannot identify anything new and actionable, exit without creating an issue or PR. Not every run needs to produce output."
  • Add a "dry run" concept where the agent evaluates whether it has something to contribute before committing to a full analysis

3. No quality feedback loop for cron-based agents

Code reference: self-development/axon-fake-strategist.yaml:60-78

The axon-workers spawner has a built-in quality feedback loop: it creates PRs that go through CI and review, and uses the axon/needs-input label to pause when blocked. The cron-based spawners have no equivalent:

  • No mechanism to track whether the issues created by axon-fake-strategist are useful vs. noise
  • No way to signal "stop creating issues like this" to the agent
  • No self-review step for created issues (unlike axon-workers which self-reviews PRs)

Possible improvements:

  • Add a self-assessment step to cron prompts: "Before creating an issue, review the last 5 issues you created (filter by generated-by-axon) and assess whether they were closed as useful or dismissed"
  • Track a "signal-to-noise ratio" by examining which generated-by-axon issues got triaged vs. stayed in needs-triage
  • Add a circuit-breaker: if the last N issues from this spawner were all closed without action, pause or change strategy

4. No coordination between cron-based spawners

The strategist and fake-user spawners run independently and may analyze the same areas or create overlapping issues. There's no mechanism for one to know what the other has done recently.

Possible improvement:

  • Add to both prompts: "Also check issues created by axon-fake-strategist / axon-fake-user to avoid overlap with the other spawner's recent work"

5. Prompt doesn't instruct agents to check for active PRs on the same branch

Code reference: self-development/axon-fake-strategist.yaml:65-70

The cron spawners create branches like axon-fake-strategist-{{.ID}}. If a previous PR is still open on a similar branch, the new agent doesn't know about it and may create conflicting work.

Possible improvement:

  • Add to prompts: "Before creating a PR, check if there are any open PRs from previous runs: gh pr list --label generated-by-axon --state open"

Priority Recommendation

  1. High: Cron dedup retry behavior (problem 1) — this is a spawner-level issue worth addressing in code
  2. Medium: "Nothing to do" exit guidance (problem 2) — simple prompt improvement, high cost savings
  3. Medium: Quality feedback loop (problem 3) — prompt improvement with agent self-assessment
  4. Low: Cross-spawner coordination (problem 4) — prompt improvement
  5. Low: Active PR checking (problem 5) — prompt improvement

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions