Repository navigation
Description
Problem Description
Agent shells print two noise lines on each uv run:
- In a worktree, uv prints a warning that
VIRTUAL_ENV=/workspaces/devops-cli/.venvdoes not match the project environment.venv. The warning tells the agent to use--active. That flag is harmful: it points the main.venveditable install at the worktree. - Each
uv runprintsBytecode compiled 19212 files in <n>ms, because the devcontainer image setsUV_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
- Start Claude Code from the VS Code extension in the devcontainer.
- In a worktree, run
uv run python -c 'import sys; print(sys.prefix)'. - See the
VIRTUAL_ENVwarning and theBytecode compiledline.
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
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(devcontainer)scope of the title gives the scope.It wastes about 20.6M tokens per week and confuses agents, but it does not break functionality.It removes two misleading lines on every uv run call and saves measurable token cost.The fix adds two key-value pairs to one JSON env block.Both items edit the env block of .claude/settings.json, but #4478 fixes a spec/template mismatch while this candidate suppresses uv output noise.devops-cli-service commentedon Nov 11, 2026
Released in v0.112.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.0
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 14:13 UTC