Skip to content

Fix system_prompt_file workspace root resolution#4108

Merged
esengine merged 2 commits into
esengine:main-v2from
lifu963:pr/system-prompt-file-workspace-root
Jun 12, 2026
Merged

Fix system_prompt_file workspace root resolution#4108
esengine merged 2 commits into
esengine:main-v2from
lifu963:pr/system-prompt-file-workspace-root

Conversation

@lifu963

@lifu963 lifu963 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resolve relative [agent] system_prompt_file paths against the active workspace root instead of the process cwd.
  • Wire boot.Build to pass its resolved workspace root into system prompt loading.
  • Add config tests for workspace-relative and absolute prompt file paths.

Test plan

  • gofmt -l . | rg -v '^desktop/' || true
  • go test ./internal/config/ -run 'TestResolveSystemPromptForRoot' -v
  • go test ./internal/config/ -count=1
  • go test ./internal/boot/ -count=1

Notes

  • PR diff intentionally excludes local-only files such as AGENTS.md, architecture/, context/, and proposal.md.
  • Manual Desktop validation was not run in this session.

Made with Cursor

lifu963 and others added 2 commits June 12, 2026 10:59
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 12, 2026
@esengine

Copy link
Copy Markdown
Owner

Clean fix. Resolving system_prompt_file against the resolved workspace root means it now follows the same path rules as skills, memory, and write-roots — exactly right for Desktop tabs where the process cwd isn't the project root. Nice touch keeping ResolveSystemPrompt() as a ForRoot(".") shim so the old cwd-relative behavior is byte-for-byte preserved, and the relative/absolute tests cover both branches. Merging — thanks!

@esengine esengine merged commit 3d3f018 into esengine:main-v2 Jun 12, 2026
14 checks passed
@lifu963 lifu963 deleted the pr/system-prompt-file-workspace-root branch June 12, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants