Skip to content

docs: authenticate the review agent in quickstart + recipe scripts - #153

Merged
mountainowl merged 1 commit into
mainfrom
docs/quickstart-agent-login
Jul 7, 2026
Merged

docs: authenticate the review agent in quickstart + recipe scripts#153
mountainowl merged 1 commit into
mainfrom
docs/quickstart-agent-login

Conversation

@mountainowl

Copy link
Copy Markdown
Owner

Follow-up to #152. The generated /build (ScriptBuilder) and /recipes (RecipePicker) scripts wrote env.toml but never authenticated the review agent, so the first bubo-poller ran with an unauthenticated agent. The poller strips the LLM key from the agent subprocess env (the REVIEWER_ENV_ALLOWLIST anti-exfiltration defense), so the agent must carry its own login — exactly why action.yml has a dedicated login step.

Fix (mirrors action.yml)

  • Two-pass init: bubo init --no-agent-config seeds the workspace, then — after the config is written — bubo init templates the agent profile from it. This also fixes an ordering bug where a non-default llm_model (e.g. claude-opus-4-8) never reached the agent profile because init ran before the config was written.
  • Agent auth step, per agent:
    • Codex (default): printf '%s' "$KEY" | codex login --with-api-key (writes ~/.codex/auth.json, read back via the allowlisted CODEX_HOME). For Docker, the login runs in-container so it persists in the mounted home.
    • Claude (custom reviewer_command): a note to sign in with its own login — action.yml likewise skips auto-auth for custom commands.
    • Self-hosted (llm_base_url): none needed; the key reaches the agent via LLM_API_KEY in base_url mode.
  • Fix the agentic install prompt step order (write config → init) and add the authenticate-the-agent step.

Verification

  • next build (with NEXT_PUBLIC_BASE_PATH=/bubo) green; all 16 pages export.
  • Ran composeRecipe and buildScript directly (esbuild bundle) across codex/claude/self-hosted × uv/docker × mac/linux/windows — confirmed each emits the correct init sequence and the right auth line (or note) for its agent.

The generated quickstart (/build) and recipe (/recipes) scripts wrote the
config but never logged the agent in, so the first `bubo-poller` ran with an
unauthenticated agent — the poller strips the LLM key from the agent's env
(anti-exfiltration allowlist), so the agent must carry its own login.

Mirror action.yml's proven sequence:
- Two-pass init: `bubo init --no-agent-config` seeds the workspace, then
  `bubo init` templates the agent profile from the written config (so a
  non-default llm_model actually reaches the profile).
- Agent auth step: the default Codex agent logs in from the key
  (`codex login --with-api-key`, in-container for Docker); Claude is a custom
  reviewer_command that brings its own login; a `llm_base_url` gateway needs
  none (the key reaches the agent via LLM_API_KEY in base_url mode).

Also fix the agentic install prompt's step order (write config before the
profile-templating init) and add the authenticate-the-agent step.
@mountainowl
mountainowl merged commit 175de6b into main Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant