Skip to content

[BUG] Cron jobs split across profile directories — created in wrong profile, not visible to gateway #25290

@fwends

Description

@fwends

Problem

Hermes has a multi-profile system where each profile (default, kimicoder, coder, etc.) has its own data directory at ~/.hermes/profiles/<profile>/. However, cron jobs are fragmented across profiles:

  • ~/.hermes/cron/jobs.json — 14 jobs (default profile, used by the CLI)
  • ~/.hermes/profiles/kimicoder/cron/jobs.json — 2 jobs (kimicoder profile, used by the running gateway)

The running gateway (as kimicoder profile) only sees its own 2 crons and ignores the other 12.

Post-Mortem: Task t_93298a9e

  1. Task created: "make a cron task in http://127.0.0.1:9000/cron to monitor every 30 mins the h13b"
  2. Agent created cron 84d83e65cf6e — this was saved to ~/.hermes/cron/jobs.json (default profile)
  3. Gateway runs as kimicoder profile — reads from ~/.hermes/profiles/kimicoder/cron/jobs.json (only 2 jobs)
  4. hermes cron list also uses default profile — shows only 2 jobs
  5. Result: cron exists in a file but neither the CLI nor the gateway can see it

The cron was not wiped by the update. It was created in the wrong profile.

Impact

  • Crons created in one profile are invisible to other profiles
  • The hermes cron list command (default profile) and the running gateway (kimicoder profile) see different sets of crons
  • Users lose track of which crons exist and where
  • Task t_93298a9e shows "running" but the cron it was supposed to create is in the wrong profile and not being executed

Root Cause

  1. The cron creation tool doesn't warn about or enforce which profile's storage to use
  2. The running gateway uses its profile's cron storage, not the default
  3. hermes cron list uses the default profile's storage
  4. No merge or sync between profile-specific cron stores

Expected Behavior

  • All profiles should share a single cron store, OR
  • Cron creation should prompt/confirm which profile to use, OR
  • hermes cron list should show crons across all profiles or clearly indicate which profile each belongs to

Suggested Fix

  1. Unified cron storage: Move cron storage out of profile-specific directories into a shared location that all profiles read/write
  2. Profile-aware cron commands: hermes cron list --profile kimicoder to see a specific profile's crons
  3. Warning on creation: When creating a cron, warn if the active profile differs from the one running the gateway
  4. Cross-profile list: hermes cron list --all to show crons from all profiles

Technical Details

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/cronCron scheduler and job managementtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions