Repository navigation
fix(agent): pass --url to the agent prompt - #144
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/reverse_api/prompts/auto/user_agent_browser.md">
<violation number="1" location="src/reverse_api/prompts/auto/user_agent_browser.md:62">
P2: This code-fenced command is not valid shell: Bash parses `<target-url>` as redirection and fails before `agent-browser` runs. Render the URL from `<start_url>` as a quoted argument, or use a shell-safe placeholder and explicitly tell the agent to substitute it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| {agent_browser_shell} network har start | ||
| # verify exit code 0; if non-zero, diagnose with `{agent_browser_shell} doctor` and stop | ||
| {agent_browser_shell} open https://example.com | ||
| {agent_browser_shell} open <target-url> |
There was a problem hiding this comment.
P2: This code-fenced command is not valid shell: Bash parses <target-url> as redirection and fails before agent-browser runs. Render the URL from <start_url> as a quoted argument, or use a shell-safe placeholder and explicitly tell the agent to substitute it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/reverse_api/prompts/auto/user_agent_browser.md, line 62:
<comment>This code-fenced command is not valid shell: Bash parses `<target-url>` as redirection and fails before `agent-browser` runs. Render the URL from `<start_url>` as a quoted argument, or use a shell-safe placeholder and explicitly tell the agent to substitute it.</comment>
<file context>
@@ -59,7 +59,7 @@ Start HAR recording **before** navigation and confirm it succeeded (abort if thi
{agent_browser_shell} network har start
# verify exit code 0; if non-zero, diagnose with `{agent_browser_shell} doctor` and stop
-{agent_browser_shell} open https://example.com
+{agent_browser_shell} open <target-url>
{agent_browser_shell} snapshot -i --json
# … iterate …
</file context>
# Conflicts: # tests/test_utils.py
Fixes #140
Why
In agent mode,
--urlwas validated and stored, but it never reached the agent. The agent only saw--prompt, so it did not know where to start unless the prompt named the site.What
start_url, andrun_auto_capturepasses it to them.<start_url>block right after<mission>. The text comes from the newprompts/auto/start_url.md.Verification
-ureaches the engine for all 4 SDKs.pytest(1038 passed),ruff check.sdk: claude,chrome-mcp,--headless):https://jobs.ashbyhq.com/openai;Out of scope
Reporting
status: "ok"when no client is written. That is handled separately.

Confidence Score: 5/5
Safe to merge within the reviewed scope. The URL reaches the final user prompt for all four engines, and omitting it preserves existing prompt output.Summary
Passes
--urlinto the agent message for Claude, OpenCode, Copilot, and Cursor.Acknowledged scope: kalil0321 explicitly deferred reporting success when no client is written to separate work.
No blocking issues were found; this change is safe to merge within the reviewed scope.
Reviews (1) · Last reviewed commit: "fix(agent): pass --url to the agent prom..." · Reviewed by Greptile