Skip to content

fix(cli): ag run finds project-local .aegis/config.yaml (#3307)#3313

Merged
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/3307-config-path-walk
May 13, 2026
Merged

fix(cli): ag run finds project-local .aegis/config.yaml (#3307)#3313
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/3307-config-path-walk

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

Fix #3307: ag run finds project-local .aegis/config.yaml

Problem

ag run failed with timeout because defaultConfigPath() was hardcoded to ~/.aegis/config.yaml, ignoring project-local configs created by ag init.

Fix

defaultConfigPath() now calls findConfigFilePath() to search for existing configs (.aegis/config.yaml, .aegis/config.yml, aegis.config.json in CWD, then home) before falling back to the hardcoded home path.

Changes

  • src/commands/run.ts: Import findConfigFilePath, use it in defaultConfigPath()
  • src/__tests__/fix-3307-config-path-walk.test.ts: 6 new tests
  • src/__tests__/run-prompt-poll-3243.test.ts: Added findConfigFilePath mock (was missing, causing test breakage)

Verification

tsc --noEmit: βœ… Zero errors
npm run build: βœ… Success
npm test: βœ… 4145 passed, 3 pre-existing failures (same on develop)

Note

Applied emergency direct implementation exception β€” Aegis prompt delivery regression (#3271) blocks dogfooding.

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Approved. Clean, minimal fix for #3307.

Review:

  • defaultConfigPath() was hardcoded to ~/.aegis/config.yaml, ignoring project-local configs from ag init. Now calls findConfigFilePath() first β€” which already existed and searches .aegis/config.yaml, .aegis/config.yml, aegis.config.json in CWD then home.
  • 6 new tests covering CWD discovery, nested dirs, no-config case, alternate extensions, and JSON config.
  • Missing findConfigFilePath mock added to run-prompt-poll-3243.test.ts β€” correct, would have broken that test.
  • No secrets, no security issues, targets develop.

⚠️ CI still running β€” will merge once green.

defaultConfigPath() in run.ts was hardcoded to ~/.aegis/config.yaml,
ignoring project-local configs. Now uses findConfigFilePath() to search
for existing configs before falling back to home directory.

Fixes #3307
@OneStepAt4time OneStepAt4time force-pushed the fix/3307-config-path-walk branch from 5edcc2c to 89de437 Compare May 13, 2026 23:40

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. defaultConfigPath() now uses findConfigFilePath() to discover project-local .aegis/config.yaml before falling back to XDG/home. Fixes ag run timeout when project has a local config. 6 tests cover various config discovery scenarios. All 9 merge gates pass.

@aegis-gh-agent aegis-gh-agent Bot merged commit af6b879 into develop May 13, 2026
17 checks passed
@aegis-gh-agent aegis-gh-agent Bot deleted the fix/3307-config-path-walk branch May 13, 2026 23:45
OneStepAt4time pushed a commit that referenced this pull request May 16, 2026
Adds entries Hermes missed for: --json-logs (#3519), CLI shortcuts
(#3521), ag run timeout (#3518/#3498), auto MCP wiring (#3501),
Windows workDir (#3502), cost tracking fixes (#3311), metering
lifecycle (#3315), preflight auth (#3314), project-local config
(#3313), /send non-blocking (#3437), ACP notifications wired (#3463),
design tokens system-wide (#3456), auth persistence (#3386),
protobufjs CVE (#3218), and 16 more.
aegis-gh-agent Bot pushed a commit that referenced this pull request May 16, 2026
* chore(release): bump version to 0.6.7 (#3495)

- package.json: 0.6.7-preview.1 β†’ 0.6.7
- .release-please-manifest.json: 0.6.7-preview.1 β†’ 0.6.7
- Helm charts: version + appVersion aligned
- CHANGELOG.md: Unreleased β†’ 0.6.7 release header
- Docs: version references updated

Key fixes in this release:
- #3479: sendPrompt uses request() with 5s ack timeout
- #3484: proactive keys.json reload + orphan auth-token detection
- Zero-config first run (ag run, ag init)
- ACP cutover complete (tmux removed)
- 150+ PRs since v0.6.6

* docs(changelog): add 93 missing entries for PRs #3250-#3517

Covers all merged PRs since the last changelog update (#3254):
- 11 Added (cost tracking, runner, CLI subcommands, dashboard features)
- 4 Changed (auth refactor, design tokens, route cleanup)
- 49 Fixed (ACP, CLI, API, dashboard, deploy, security, CI)
- 26 Documentation (RBAC, competitive, guides, README, ADR)
- 2 Dependencies (dashboard deps, OTel)

Requested by Scribe after review identified ~80+ missing entries.

* docs(changelog): editorial follow-up β€” 36 remaining PRs from Scribe pass

Adds entries Hermes missed for: --json-logs (#3519), CLI shortcuts
(#3521), ag run timeout (#3518/#3498), auto MCP wiring (#3501),
Windows workDir (#3502), cost tracking fixes (#3311), metering
lifecycle (#3315), preflight auth (#3314), project-local config
(#3313), /send non-blocking (#3437), ACP notifications wired (#3463),
design tokens system-wide (#3456), auth persistence (#3386),
protobufjs CVE (#3218), and 16 more.

* docs(changelog): comprehensive 0.6.7 changelog β€” all 141 PRs, Boss's categories

Complete rewrite of the 0.6.7 section:
- 150 commits, 141 unique PRs β€” every single one listed
- Organized by Boss's requested categories:
  Security (21), Features (19), Bug Fixes β€” ACP (14),
  Bug Fixes β€” CLI (13), Bug Fixes β€” API (12),
  Bug Fixes β€” Dashboard (14), Bug Fixes β€” Other (8),
  Documentation (42), Dependencies & Chore (6)
- No summarization β€” each PR gets its own bullet
- All PR references verified against git log

Co-authored-by: Scribe <scribe@openclaw.ai>

---------

Co-authored-by: Argus <argus@openclaw.ai>
Co-authored-by: Hephaestus <hep@aegis.dev>
Co-authored-by: Scribe <scribe@openclaw.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant