'gaia schedule add' with a taken name prints a Python traceback

Open Beginner friendly
#7,983 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start with _handle_schedule in src/gaia/cli.py, which does not catch the ValueError that add in src/gaia/schedule/store.py (around line 371) raises for a duplicate name. Reproduce by running gaia schedule add twice with the same --name in a scratch home. Done when the second run prints one plain line saying the name is taken and exits 1, with no traceback. The shared schedules.toml between the CLI and the Agent UI is a separate design question, so leave it for the maintainers.

Written by the indexing model from the issue text.

Description

bug cli needs-human p3

'gaia schedule add' with a taken name prints a Python traceback.

Steps

  1. With the frozen gaia.exe from the rc24 app (resources/core/gaia.exe), in a scratch home: gaia schedule add --name cli-dup --cron "0 7 * * 1-5" --prompt hi.
  2. Run the same command again.

Expected: One clear line: the name is taken, pick another; exit 1.
Actual: 'Traceback (most recent call last): ... gaia/schedule/store.py line 371, in add ValueError: schedule cli-dup already exists in ...schedules.toml; remove it first or pick a different --name' followed by '[PYI-...:ERROR] Failed to execute script entry due to unhandled exception!'. Also the CLI keeps its own schedules.toml, so a name used in the Agent UI is not taken for the CLI (both now have a 'morning-brief').

Build: v0.26.0-rc24 packaged Windows app (isolated profile, chat on a cloud model)
Found by: the v0.26.0-rc24 final release test, finding F19

🔍 Technical details
  • Suspected area: src/gaia/cli.py _handle_schedule does not catch ValueError from schedule/store.py add
Dominant language
Python
Stars
1.6k
Forks
169
Avg merge
12h 19m
Merged PRs (30d)
777

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from amd/gaia

All issues in amd/gaia

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.