warp icon indicating copy to clipboard operation
warp copied to clipboard

Make authenticated Warp launch reliable: loud api-key warning + test-warp-ui hardening

Open vkodithala opened this issue 5 months ago • 2 comments

Description

Authenticated Warp launches for computer-use agents were failing silently. app/Cargo.toml sets default-run = "warp-oss", so a bare cargo run builds the OSS channel (src/bin/oss.rs), which drops --api-key/WARP_API_KEY and starts Warp logged out; only cargo run --bin warp (the Local/dogfood channel) honors the key. This PR makes that silent drop loud, and teaches the agent-facing skill to detect it.

Two changes:

  • app/src/lib.rs: After API-key resolution (immediately before AuthState::initialize), if an App launch was given a key but it was dropped — non-dogfood channel, or API-key auth disabled — print a one-line warning to stderr via eprintln!, including the active channel via ChannelState::channel(). Scoped to the App launch path only; CommandLine mode is unaffected.
    • Why eprintln! and nothing else: this message exists purely to show up in the command output a human or agent reads. log::* is the wrong tool here — when the process's stdout is not a TTY (e.g. an agent capturing cargo run through a pipe), the logger routes records to the on-disk log file instead of the captured stream, so the message wouldn't be seen. log::error! would additionally be captured as a Sentry event and carries false "something failed" semantics. eprintln! always lands on stderr (which the skill greps for provided but IGNORED) and keeps Sentry out of it.
  • resources/channel-gated-skills/dogfood/test-warp-ui/SKILL.md: Adds a "Verify the launch is authenticated" step — after launching, confirm Warp opened authenticated (not the logged-out onboarding/sign-in screen) and that the cargo run stderr does not contain provided but IGNORED; if it does (or the app is logged out), relaunch with cargo run --bin warp.

Linked Issue

  • [ ] The linked issue is labeled ready-to-spec or ready-to-implement.
  • [ ] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

cargo check -p warp --lib from the worktree root succeeds with no errors or warnings. The skill change is markdown-only.

  • [ ] I have manually tested my changes locally with ./script/run

Agent Mode

  • [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/b217489b-c8d2-4d7b-be84-839df2b1f167 Run: https://oz.staging.warp.dev/runs/019effad-34c2-7a02-a246-d8df3a3c521e

Co-Authored-By: Oz [email protected]

vkodithala avatar Jun 25 '26 16:06 vkodithala

This stack of pull requests is managed by Graphite. Learn more about stacking.

vkodithala avatar Jun 25 '26 21:06 vkodithala

@vkodithala

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

warp-for-oss[bot] avatar Jun 25 '26 21:06 warp-for-oss[bot]