uv exposes two distinct workflows and mixing them is the most common source of confusion. The project interface, uv add, uv remove, uv sync, uv lock, edits pyproject.toml and uv.lock and keeps them consistent. The pip interface, uv pip install, is a fast drop-in for pip and deliberately writes nothing back: it installs into the environment and leaves both files untouched.
So uv pip install httpx inside a project gives you a working import today and a missing dependency for everyone else, and the package disappears the next time uv sync runs, because the lock never learned about it.
Use uv add httpx in a project, which updates the manifest, the lock, and the environment in one step. uv add --dev and uv add --group docs place it in a group. Reserve the pip interface for environments that are not uv projects, such as a scratch venv or a migration from an existing requirements-based setup. uv tree is a quick way to confirm what the lock believes is installed.