fix(agent): pass --url to the agent prompt

Merged
KA
1d ago
+172-20

Fixes #140

Why

In agent mode, --url was 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

  • The 4 agent engines (Claude, OpenCode, Copilot, Cursor) now accept start_url, and run_auto_capture passes it to them.
  • When a URL is given, the user message gets a <start_url> block right after <mission>. The text comes from the new prompts/auto/start_url.md.
  • When no URL is given, the message is unchanged.

Verification

  • New tests:
    • the block is rendered for each of the 3 templates;
    • without a URL, the template output is unchanged;
    • OpenCode renders the block;
    • -u reaches the engine for all 4 SDKs.
  • The new tests fail without the fix.
  • pytest (1038 passed), ruff check.
  • Real run with the issue's command (sdk: claude, chrome-mcp, --headless):
    • the agent's first navigation was to https://jobs.ashbyhq.com/openai;
    • the generated client returned 794 postings.

Out of scope

Reporting status: "ok" when no client is written. That is handled separately.

RetriggerView in GreptileConfidence 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 --url into the agent message for Claude, OpenCode, Copilot, and Cursor.

  • Agent prompts now start at the supplied URL.

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