#Oz Agents based on cwd
17 messages · Page 1 of 1 (latest)
Hi @clever wigeon. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
You’re not limited to the main branch on GitHub—Oz can run directly against whatever checkout (branch, dirty state, local-only repo) you’re currently in.
From the CLI, use a local agent run instead of a cloud run tied to an environment:
oz agent run --prompt "your task here"
By default this runs in your current working directory, using the files exactly as they exist there (including uncommitted changes and any branch you’re on). You can also point it at any other path:
oz agent run --cwd /path/to/your/test-repo --prompt "your task here"
This is specifically recommended for “interactive local runs where you’re already in a working checkout and relying on your existing machine setup,” where you don’t need an environment tied to a GitHub repo/branch. [Running agents; When to use environments]
If you instead use cloud agents with environments, those are built from configured repos/images and will reflect whatever branch/commit the environment setup uses, not your unpushed local state. In that case, to keep your exact local context, stick with oz agent run (local) rather than oz agent run-cloud. [Oz CLI; Oz cloud agents]
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@clever wigeon Kapa.ai is still learning and improving, please let me know how I did by reacting below.
How do I do this from the desktop app without running that cli command? I am only aware of cmd+enter to start a new oz agent @brazen saddle
Let me check the knowledge base for you again. One moment! :books:
You can start an Oz agent that uses your current working directory directly from the Warp desktop app, without typing the oz CLI command yourself.
From the docs, there are two relevant ways to start local Oz agent conversations (which run against your current repo/branch and local files):
-
Use the agent conversation view shortcut
- Press
⌘↩(Command+Enter on macOS, orCtrl+Shift+Enteron Windows/Linux) from terminal mode to open the Oz agent conversation view. [Agent modality] - The agent then works with whatever directory you’re currently in (including uncommitted changes).
- Press
-
Use slash commands in the terminal
- Type
/agent(or/agent <your prompt>) in the terminal and hit Enter. This also opens a new agent conversation tied to your current session and directory. [Agent modality]
- Type
Both of these start local agents, not cloud agents, so they operate directly on your current checkout (any branch, dirty state, test repo, etc.) without needing a commit or push. [Local agents overview; Agents in Warp]
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@clever wigeon Kapa.ai is still learning and improving, please let me know how I did by reacting below.
I just tried this and its not working. Are you sure about this? @brazen saddle
Press ⌘↩ (Command+Enter on macOS, or Ctrl+Shift+Enter on Windows/Linux) from terminal mode to open the Oz agent conversation view. [Agent modality]
The agent then works with whatever directory you’re currently in (including uncommitted changes).
Let me check the knowledge base for you again. One moment! :books:
You’re right to question this, and thanks for calling it out.
From the docs, ⌘↩ / Ctrl+Shift+Enter does start a new agent conversation (Oz agent conversation view) from terminal mode. [Keyboard shortcuts; Entering conversations]
However, the knowledge sources do not explicitly state that this conversation will always run the agent “in your current working directory with uncommitted changes,” nor do they describe a UI control in the desktop app that lets you choose between:
- “use my exact local cwd (dirty state)” vs
- “use a GitHub-based environment / main branch.”
That cwd behavior is clearly documented for the oz CLI (e.g., oz agent run --cwd ...), but I don’t see an equivalent, explicit guarantee for conversations started purely via ⌘↩ in the Warp UI in the provided sources. [Oz blog]
So:
- Yes:
⌘↩/Ctrl+Shift+Enteris the correct shortcut to start a new agent conversation from terminal mode. - No: I cannot confidently confirm from the docs that this always uses your current local working directory (including uncommitted changes) the same way
oz agent runwith--cwddoes.
If ⌘↩ is not behaving as expected for you (or not starting a conversation at all), that may also be related to recent changes/bugs around agent shortcuts (e.g., reports of CMD+I / CTRL+I behavior changing or breaking). [Missing CMD+I; Keyboard shortcut issue]
Given the limits of the docs here, the most reliable way (per the knowledge sources) to guarantee cwd + dirty state is still via the oz CLI with --cwd. The sources don’t provide a clearer, UI-only alternative.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@clever wigeon Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@brazen saddle it also looks like this doesnt run in the cloud. Its running on my machine.
oz agent run --cwd /path/to/your/test-repo --prompt "your task here"
Let me check the knowledge base for you again. One moment! :books:
You’re correct: based on the docs, oz agent run is a local run, not a cloud run.
The Oz CLI has two main modes:
oz agent run→ runs the agent locally, using your current machine and (by default) your current working directory. [Running agents]oz agent run-cloud→ runs the agent in a remote/cloud environment (Warp-hosted or self-hosted), using an Oz environment you’ve configured. [Running agents; Environments]
So the behavior you’re seeing with:
oz agent run --cwd /path/to/your/test-repo --prompt "your task here"
matches the docs: it runs on your machine, with your local files (including uncommitted changes), and does not use a cloud environment.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@clever wigeon Kapa.ai is still learning and improving, please let me know how I did by reacting below.