[ norboten ]
claude · lab claude-06

The Settings That Disagree

· about 40 minutes · runs on ubuntu-26.04-claude · unrated

An unrated lab. It runs on your machine with no account and no network, and everything about it — the faults, the checks, the hints and the reference solution — is in the repository. An attempt on it is recorded on your profile and never moves a rating: only rated labs do. Rated and unrated labs.

The briefing

This is the platform team's shared build machine. Three rules were agreed, and none of them holds.

The security team's policy, for every Claude Code session on the machine, whoever runs it and however: no web fetching or searching, and nobody's ~/.ssh is read. It was installed last week as a managed settings file. Yesterday a session fetched a URL and printed a private key.

The platform team's model: routine work in ~/platform runs on Haiku, set in the project's settings. Sessions there run on Opus.

The conventions: ~/platform/CLAUDE.md pulls in the team's coding conventions, and the model never follows them.

This lab runs in a container, as learner with sudo. claude here is the real Claude Code 2.1.270, talking to a scripted model on this machine; which settings load, which tools are refused and which model is requested are Claude Code's real decisions. There is a private key in ~learner/.ssh for it to be tempted by.

What is expected, and graded:

  1. The policy holds in any directory, even for a session started with --allowedTools "WebFetch,WebSearch,Read,Bash": no web tools, and no key reaches the model.
  2. A session in ~/platform that names no model runs on Haiku.
  3. Settings meant for one person's machine are not in the repository, and git ignores them.
  4. The conventions document reaches the model in every session in ~/platform.

Change the policy's location or permissions if you must, not its rules.

What is graded

This lab runs in a container — Docker or Podman, no VM — so there is no boot to survive: the checks run once, against the state you left.

CheckObjective
01_the_machine_policy_holds_everywhereEnforce a machine-wide policy no project, user or flag can loosen
02_the_team_model_is_usedPredict which settings level wins, and keep personal settings personal
03_personal_settings_stay_out_of_gitPredict which settings level wins, and keep personal settings personal
04_the_conventions_reach_the_modelMake project instructions, imports included, reach the model

Start it

  1. 2Labs
  2. claude-06select this one
  3. udownload it
  4. sstart the machine

Reading

Where the lab's hints send you, level by level, as you ask for them (h, then l opens a journal section in the TUI).

Theory for this lab

4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:

Question 1

~/.claude/settings.json says `"model": "sonnet"`, the project's .claude/settings.json says `"model": "haiku"`, and .claude/settings.local.json says `"model": "opus"`. A session is started in the project with no --model. Which model does it request?

Question 2

A policy denying WebFetch is saved as /etc/claude-code/managed-settings.json, owned by root with mode 0600. A user runs claude -p with --allowedTools WebFetch. What happens?

Question 3

A project's CLAUDE.md contains the line `@docs/conventions.md`, and the file in the repository is docs/CONVENTIONS.md, on Linux. What does the model receive?