Skip to content

Fix agent working directory to use target path, allowing user to invoke Conclave from a different dir#6

Open
paulkarayan wants to merge 2 commits intogravitational:mainfrom
paulkarayan:pk/working-dir
Open

Fix agent working directory to use target path, allowing user to invoke Conclave from a different dir#6
paulkarayan wants to merge 2 commits intogravitational:mainfrom
paulkarayan:pk/working-dir

Conversation

@paulkarayan
Copy link

Description
I followed the quickstart and was confused as to why my Conclave runs were showing prompt injection vulns in files in the the ~/conclave directory despite invoking it as such: ./conclave --claude run ~/golang-learning/dj-broadcast

I saw that Agent subprocesses (Claude, Codex, Gemini) were not being started in the target codebase directory, and were likely inheriting the working directory of the conclave process itself. The bug only surfaces when invoking Conclave from a different directory with an explicit path argument.

I think what's happening is the [path] argument exists but wasn't wired through to the agent subprocesses. This could have been missed if it was invoked with go run or a user had it in their GOPATH/bin.

Fix
I added var GlobalWorkDir string to match how the codebase already uses GlobalSession and GlobalRegistry, then set cmd.Dir on all agent subprocesses.

Alternative: update the documentation to specify invocation expections

Testing

  • Run conclave --claude run <some-other-project> from the conclave repo directory
  • Verify agent findings reference files in the target project, not in conclave's own source

@paulkarayan paulkarayan closed this Mar 8, 2026
@paulkarayan
Copy link
Author

PR doesn't actually fix it! will fix...

@paulkarayan
Copy link
Author

ok - so what I found was a stale plan caused the same testing to be run! now it works after I also added:

  • assess, convene, complete derive GlobalWorkDir from the plan's stored CodebaseRoot

@paulkarayan paulkarayan reopened this Mar 8, 2026
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