Skip to content

fix(devcontainer): stop uv noise lines in agent shells #4588

Closed

Description

@dan-petty

Problem Description

Agent shells print two noise lines on each uv run:

  1. In a worktree, uv prints a warning that VIRTUAL_ENV=/workspaces/devops-cli/.venv does not match the project environment .venv. The warning tells the agent to use --active. That flag is harmful: it points the main .venv editable install at the worktree.
  2. Each uv run prints Bytecode compiled 19212 files in <n>ms, because the devcontainer image sets UV_COMPILE_BYTECODE=1.

The context audit counts about 20.6M tokens a week for these lines.

Cause of the first line: the Claude Code VS Code extension setting claudeCode.usePythonEnvironment (default true) reads the selected interpreter from the Python extension and starts claude with VIRTUAL_ENV set to the main .venv. The python.terminal.activateEnvironment setting in .devcontainer/devcontainer.json is not the cause: Kilo starts from the same extension host and has no VIRTUAL_ENV.

Reproduction Steps

  1. Start Claude Code from the VS Code extension in the devcontainer.
  2. In a worktree, run uv run python -c 'import sys; print(sys.prefix)'.
  3. See the VIRTUAL_ENV warning and the Bytecode compiled line.

Expected vs Actual Behavior

Expected: uv run in a worktree prints no VIRTUAL_ENV warning and no Bytecode compiled line, and sys.prefix names the worktree .venv.

Actual: both lines show on each call.

Proposed fix

Set "VIRTUAL_ENV": "" and "UV_COMPILE_BYTECODE": "0" in the env block of .claude/settings.json. Do not use uv run -q, because it also hides the editable reinstall lines. Do not change UV_COMPILE_BYTECODE in the root Dockerfile: runner pods have a read-only root, so they need the compiled bytecode.

Related: #4405 (CI wall time, not the same problem).

Activity

  1. added
    source/agent
    type/bug
    scope/devcontainer
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/devcontainer. The (devcontainer) scope of the title gives the scope.
    • Priority: P2-Medium. It wastes about 20.6M tokens per week and confuses agents, but it does not break functionality.
    • Value: Medium. It removes two misleading lines on every uv run call and saves measurable token cost.
    • Effort: Low. The fix adds two key-value pairs to one JSON env block.
    • Related: fix(openspec): agent config spec names absent Claude settings #4478, which asks for a different change. Both items edit the env block of .claude/settings.json, but #4478 fixes a spec/template mismatch while this candidate suppresses uv output noise.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 11, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor
  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 14:13 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/devcontainersource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions