Record that a Claude home of its own loads the setup and signs in by a long-lived token, but not under --bare
This commit is contained in:
@@ -18,6 +18,7 @@ Each project principle states one rule that the decisions below apply; their ent
|
||||
- bin/: the tools send no OTLP traces, logs or metrics, and loop-claude's archive holds the trace of each cycle
|
||||
- bin/: the tools support only the latest stable Python, and the tests, written in plain unittest, run on it in four pytest-xdist workers
|
||||
- chunk-pr: the chunks of a project merge one at a time on a machine, each finishing its plan items in its turn, and a pull request that waits for an approval leaves the queue while it waits
|
||||
- Claude Code in a home of its own: the loop sets `CLAUDE_CONFIG_DIR`, which loads `CLAUDE.md`, rules, agents, skills, hooks and plugins, and `CLAUDE_CODE_OAUTH_TOKEN` signs in there, but never with `--bare`
|
||||
- deploy: this repo keeps no `AGENTS.md`, since `~/.claude` is its checkout; its principles and decision titles head `docs/decisions.md`, its working rules follow them there, and its `.claude/settings.json` excludes every `.claude/CLAUDE.md`, so a session in the clone loads only the clone's `CLAUDE.md`
|
||||
- do-epic: drives one Jira epic whose items span repos, or have none, ranked by the epic's goals, then code health, then each repo's goals, and closes the epic only once the human confirms every goal
|
||||
- epic-branch: an epic's chunks branch off and merge into a working branch its project's config names, without a person, and a person merges that branch into the default branch in one pull request
|
||||
@@ -123,6 +124,16 @@ Valid while a chunk's worker runs `chunk-pr merge` itself, and one machine runs
|
||||
|
||||
The cap is 5, `bin/plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, where the 90th percentile was 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so an item that could take everything down shares a chunk only where its L + E is 3 or less, and an irreversible I 5 item, at R 7 or more, never does. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it.
|
||||
|
||||
## Claude Code in a home of its own: the loop sets `CLAUDE_CONFIG_DIR`, which loads `CLAUDE.md`, rules, agents, skills, hooks and plugins, and `CLAUDE_CODE_OAUTH_TOKEN` signs in there, but never with `--bare`
|
||||
|
||||
2026-11-20, lilleman's standalone-install plan. Serves goal 2, so the setup installs without taking over the human's `~/.claude`, and goal 4: a home of its own keeps the loop's transcripts and token apart from the human's. Every claude the loop starts runs in a home of its own, not with `--plugin-dir`, `--settings` and `--append-system-prompt-file` over the human's home. Tested on Claude Code 2.1.330, on throwaway homes, never the human's. A mock Messages API at `ANTHROPIC_BASE_URL` recorded each request and had the model read a file, so the system prompt and the tool results show what loaded, with no real token. Valid while a new Claude Code version still behaves so; repeat the probe after each major upgrade.
|
||||
|
||||
- **Loads from `$CLAUDE_CONFIG_DIR`:** `CLAUDE.md` (in the system prompt), `rules/*.md` (one with `paths:` entered the context after the model read a matching file, not before), `agents/`, `skills/`, the hooks of `settings.json` (a `SessionStart` hook ran) and plugins. `claude plugin marketplace add` and `claude plugin install` write to `<home>/plugins`, and the installed plugin's skill is listed. `.claude.json` lands in the home too, so the human's `~/.claude.json` stays theirs.
|
||||
- **Signs in by `CLAUDE_CODE_OAUTH_TOKEN`:** the request carried `Authorization: Bearer <token>` with the `oauth-2025-04-20` beta, and `claude auth status` said `loggedIn: true, authMethod: oauth_token`. The home held no credentials file. Without the variable the home is `loggedIn: false`. Not tested: that Anthropic accepts a real token, since `claude setup-token` needs the human's browser sign-in. The authentication docs say it lasts one year and can only make model requests; the first real run checks both.
|
||||
- **`--bare` can't use that token.** With `CLAUDE_CODE_OAUTH_TOKEN`, it says `Not logged in · Please run /login` and sends no request. With `ANTHROPIC_API_KEY` it signs in, but loads nothing from the home (no `CLAUDE.md`, rules, agents or skills) and offers only Bash, Edit and Read. So a container that signs in by a long-lived token runs without `--bare`; its fresh home is empty, so nothing of the human's loads either. The project's `CLAUDE.md` loads from the working folder, and its `AGENTS.md` only where the project has no `CLAUDE.md`.
|
||||
- **Transcripts** land in `<home>/projects/<working folder, each / as ->/<session id>.jsonl`. `--no-session-persistence` writes none, only an empty `memory` folder, so a bench that uses it reads the run from `--output-format stream-json`.
|
||||
- **The model catalogue** sits in `<home>/cache/model-catalog/` on the human's machine, as `bin/loop_state/paths.py` expects. The throwaway homes wrote none, since the mock was the only server they reached. Not tested: whether a long-lived-token session writes it. Where it doesn't, `bin/chunk_driver/project/model_choice.py` already prints `no model catalog cached` and takes a typed model name.
|
||||
|
||||
## comprehension floor: every dimension and the overall at the project's readability floor or above is the target, and no score blocks a merge or release
|
||||
|
||||
2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. 2026-10-13, lilleman: the floor doesn't block anything, and `review: the comprehension check records …` says why. Valid while the scoring run keeps its four seats. 2026-11-12, lilleman, through todo item 358: a project's config sets this floor as `readability-floor`, its readability floor, since legacy code scores low. It is 7.0 where left out, and the signal stays that the score rises. Readers seated as the person who writes the config picked the key, 2 of 3.
|
||||
|
||||
@@ -136,7 +136,7 @@ The panel's scores barely move between chunks, and `reading-cost` measures chunk
|
||||
|
||||
- **Plant.** Run Gremlins, as item 500 runs it, without `--diff`, over the files that hold the places `larv-review places` prints. Draw 5 of its `KILLED` mutants by a seeded pick, and re-apply each at its file, line and column. The task's text is the failing assertion's message, without the test's name, file or line, so it says what goes wrong and not where. Go is the first language; item 508 adds the others.
|
||||
- **Copy.** The tree at the commit, without `.git`, committed once with the bug in it, so `git diff` and `git log` show Haiku nothing.
|
||||
- **Run.** Inside a container that holds only the copy: the project's development image with Claude Code added, such as `golang` for fejkdata, signed in by a long-lived token in an environment variable, with a memory limit and the network only for the API. In it, `claude -p --bare --strict-mcp-config --disable-slash-commands --no-session-persistence --model claude-haiku-5-5 --effort low --output-format stream-json` runs with every tool, Bash included, so Haiku greps, builds, runs the CLI and runs single tests as an agent normally does. A narrower tool list would raise the figures for reasons outside the code, and an allowlist can't fence Bash anyway: a rule that allows `cat` allows it on any path, such as the real checkout, whose diff would give away the bug. `--bare` drops the human's instructions, memories, hooks, skills and plugins, which would skew the figures and change with claude-config. The repo's README, `AGENTS.md` and `docs/` stay, since they are part of what the bench measures; a project's `CLAUDE.md`, which `--bare` skips, is passed in, so every project is measured alike.
|
||||
- **Run.** Inside a container that holds only the copy: the project's development image with Claude Code added, such as `golang` for fejkdata, signed in by a long-lived token in an environment variable, with a memory limit and the network only for the API. In it, `claude -p --strict-mcp-config --disable-slash-commands --no-session-persistence --model claude-haiku-5-5 --effort low --output-format stream-json` runs with every tool, Bash included, so Haiku greps, builds, runs the CLI and runs single tests as an agent normally does. A narrower tool list would raise the figures for reasons outside the code, and an allowlist can't fence Bash anyway: a rule that allows `cat` allows it on any path, such as the real checkout, whose diff would give away the bug. Without `--bare`, which can't sign in by a long-lived token (the decision `Claude Code in a home of its own`), the container's fresh Claude home, empty, loads none of the human's instructions, memories, hooks, skills or plugins, which would skew the figures and change with claude-config. The repo's README, `AGENTS.md` and `docs/` stay, since they are part of what the bench measures; a project's `CLAUDE.md` loads from the working folder, and its `AGENTS.md` only where it has no `CLAUDE.md`; the bench takes that as the project's own setup.
|
||||
- **Pair.** 5 runs per task at the base and at the head, in one bench, so a model or CLI update moves both sides. Each result names the Claude Code version and the model id.
|
||||
- **Check.** The project's test command over Haiku's changes to files other than tests, with the tests restored from the commit, so deleting a test doesn't pass.
|
||||
- **Measure.** From the stream: passed or not, tokens split into input, cache write, cache read and output, turns, wall time, and the reads before the first open of the file the bug is in.
|
||||
|
||||
Reference in New Issue
Block a user