Skip to content

Let the user pick a working directory when launching an Agent CLI #85

Closed

Description

@yujiezhang-ops

Priority: P2

What

When launching an Agent CLI from OneAgent, offer a folder picker so the terminal opens in a chosen working directory.

Why

A coding agent is only useful inside a project. Today LaunchAgent opens a terminal running the Agent's command with no cd, so the window inherits whatever directory the launcher happened to be in, and the user's first action is always to cd somewhere themselves. Picking the folder up front is the difference between "OneAgent launched my agent" and "OneAgent launched my agent on my project".

Current behaviour

LaunchAgent in internal/app/launch.go:23 takes only an agentID and reuses nextStep to build the shell line. There is no working-directory parameter anywhere in the path — not in the use case, not in the AgentService binding, not in the frontend call.

Rough shape

  • Add an optional working directory to LaunchAgentOptions (the use case currently takes a bare agentID string, so this likely means introducing an options struct).
  • Thread it through the AgentService.Launch binding DTO and the generated bindings, plus frontend/src/backend/wails.ts.
  • Native folder picker on the frontend, remembering the last choice per Agent so repeat launches are one click.
  • Validate the directory exists and is readable before launching, and report a clear error rather than opening a terminal that immediately fails.

Notes for whoever picks this up

Worth deciding early whether the directory is per-Agent or global. Per-Agent matches how someone actually works (one agent for one repo), but it is more state to store and surface.

Not urgent — there is a working manual path (launch, then cd). This is an ergonomics win, not a fix.

Activity

  1. self-assigned this
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions