Skip to content

feature: Allow setting session cwd programmatically #313

Description

@danilevy1212

I want to create a session rooted at the parent directory of my project. I have several interdependent repositories, and I run Claude Desktop from a workspace directory that contains all of them so Claude can read and write across repos. I'm moving to agentic.nvim to stay in the editor, but I can't find a way to set the session's CWD before or after creation.

The CWD is hardcoded in acp_client.lua:

function ACPClient:create_session(handlers, callback)
    local cwd = vim.fn.getcwd()
    self:_send_request("session/new", {
        cwd = cwd,
        mcpServers = {},
    }, function(result, err) ... end)
end

Ideally, cwd would be a parameter I can pass programmatically. The exact mechanics I'm not sure about — it could be a config option, an argument to Agentic.new_session, a property of agentic.ui.NewSessionOpts, or a new function. Anything that lets me set the session's CWD directly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions