Skip to content

P2: ag init --force crashes with 409 instead of overwriting existing config #3341

Description

@OneStepAt4time

Summary:
ag init --force should overwrite an existing .aegis config, but in current builds it can crash/return HTTP 409 (duplicate key) instead of performing the requested overwrite. This violates the documented --force behavior and causes friction for automated/CI bootstraps.

Severity: P2

Reproduction steps:

  1. Ensure a config exists: ag init --yes --cwd /tmp/aegis-init-test (or create ~/.aegis/config.yaml manually).
  2. Attempt a forced init: ag init --force --cwd /tmp/aegis-init-test (or ag init --yes --force as appropriate).
  3. Observe: the CLI exits with an error (HTTP 409 or process crash) and the existing config is not overwritten. Check server/CLI logs.

Observed behavior:

  • Running ag init --force can return a 409 conflict or crash the command instead of overwriting the config as --force implies.

Expected behavior:

  • --force should replace/overwrite existing configuration files without crashing; the command should be idempotent for automation and CI usage.

What to capture for triage:

  • CLI output and server logs from a run that reproduces the failure.
  • The existing ~/.aegis/config.yaml (sanitise any secrets) to inspect whether a duplicate key arises from merge logic.

Notes:

  • This affects automated installs and CI flows that rely on ag init --force for fresh bootstrapping. Marking P2 and assigning to @OneStepAt4time for investigation and fix.

Metadata

Metadata

Labels

P2bugSomething isn't workingcireleasedIncluded in a published releasetests

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions