Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"enableWorkflows": true,
"ultracode": true,
"effortLevel": "xhigh",
"workflowSizeGuideline": "unrestricted",
"switchModelsOnFlag": false,
Expand Down
4 changes: 3 additions & 1 deletion adoption/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,13 @@ GitHub-hosted macOS runner; see
[jCodeMunch recipe](../recipes/README.md#focused-jcodemunch-retrieval)
covers indexing and the native statistics.

Then apply the settings template itself (model, effort, ultracode,
Then apply the settings template itself (model, effort,
workflow env, hooks, and the credential deny rules plus the `PreToolUse`
secret-guard hook from [`docs/secret-storage.md`](../docs/secret-storage.md#user-level-guards-deployed-by-the-claude-profile)) into the live `~/.claude/settings.json` with
[`tools/adoption/apply_claude_settings.py`](../tools/adoption/apply_claude_settings.py),
after rendering it for this host with step 4's `render_config.py --out`:
The baseline omits the standing Ultracode key; task/launch opt-in uses the
[native workflow profile](../recipes/claude-native-ultracode.md) separately.
```sh
python3 tools/adoption/apply_claude_settings.py --template "$RUN_DIR/rendered/settings.json"
python3 tools/adoption/apply_claude_settings.py --template "$RUN_DIR/rendered/settings.json" --dry-run
Expand Down
1 change: 0 additions & 1 deletion adoption/templates/claude.settings.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@
"skipDangerousModePermissionPrompt": true,
"theme": "dark",
"verbose": true,
"ultracode": true,
"enableWorkflows": true,
"showThinkingSummaries": true,
"cleanupPeriodDays": 3650,
Expand Down
4 changes: 2 additions & 2 deletions catalogs/foundation/upstream-surface-dispositions.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@
{
"key": "claude:env:CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS",
"disposition": "declined",
"reason": "off on both hosts (read 2026-10-04)); the repository record at examples/claude-native/workflows/README.md:1083 names it",
"source": "examples/claude-native/workflows/README.md:1083",
"reason": "off on both hosts (read 2026-10-04)); the repository record at examples/claude-native/workflows/README.md:1089 names it",
"source": "examples/claude-native/workflows/README.md:1089",
"carrier": null,
"value": null,
"scope": null,
Expand Down
79 changes: 79 additions & 0 deletions docs/decisions/2026-09-23-max-effort-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,82 @@ Sonnet 5.5. The 2.1.281 findings above stay as history for that release. On 2.1.
Opus level.
- **The `child-usage.mjs` mirror statement under "Vendored lane" is history.** The file here has since grown well beyond agent-lab
`b31f640`, and a local agent-lab checkout holds a different, smaller copy.

## Amendment (2026-10-07): select orchestration per task

This amendment supersedes the standing-Ultracode choice in decision item 1.
It leaves the recorded probes and the effort/model rules unchanged.

**Decision.** The repository and portable user-settings template omit the
standing `ultracode` key. The coordinator chooses a dispatch mode for the task:
direct execution or a deterministic script for suitable work, normally a
bounded GPT lane or SDK worker for substantial research and builds, and a
subagent, background agent, isolated builder, workflow or team when its
coordination contract calls for it. Workflow availability stays enabled; this
change selects when to use orchestration rather than changing effort.

Claude Code 2.1.292 starts Ultracode off when the key is unset or false. A true
value selects standing orchestration, subject to workflow/model availability.
A shared project setting outranks user settings, which is why a committed true
value could restore the standing choice in other checkouts. Removing the
portable template's value also stops a subsequent profile apply from replacing
an existing user false with true; native merge semantics preserve explicit user
choices and unrelated settings.

**Task opt-in.** A direct interactive prompt can request a workflow or use the
native keyword. The session toggle is `/effort ultracode on|off`; interactive
toggles do not persist. A launch can pass
`claude --settings '{"ultracode":true}'` or the retained explicit opt-in example.
Keep model and effort choices separate. Before opting in, specify finite stage
and agent counts, concurrency, output limits, allowed effects, and verification.
The size guideline is advisory, and Ultracode suppresses native large-workflow
warnings and the session subagent concurrency limit; an unrestricted guideline
does not supply a task budget. Existing project effort, workflow-size and
environment settings are unchanged.

**Observed motivation, not a controlled comparison.** On October 7, the
command center recorded one task requesting five pieces of read-only evidence
without naming a tool, once in each headless client. The Claude run with the
standing switch on reported a workflow launch. The following are different
counter scopes, not a token or cost ratio:

| Observation | Scope | Reported value |
| --- | --- | --- |
| Codex Sol at max | Client session usage | 1,390,078 input tokens, including 1,264,640 cached input as a subset; 18,609 output tokens |
| Codex execution | Runner start/end stamps for the call | 356 seconds |
| Claude Opus 5.5 | Client model usage, cache-read input | 25,503,839 tokens |
| Claude Sonnet 5.5 | Client model usage, cache-read input | 17,108,897 tokens |
| Claude Fable 5.1 advisor | Client model usage | 297,092 input and 34,949 output tokens; 4.72 USD within the session estimate |
| Claude session | Client result | 45 turns, approximately 536 seconds, 26.38 USD estimated across all three models |

Cached input is not added to Codex input. The Claude figure is the client's
estimate, not provider billing; advisor cost is included, not an additional
charge to sum. One run per client establishes neither a general dispatch
advantage nor equivalent task quality. No run was repeated for this amendment.
The sanitized revision-2 extract has SHA256
`7f5d26c423134ee3c11c4265375d5bdaf1c49280639f4bb7ebc231585c04190d`.
The runner log's SHA256 is
`e41bffad6830f3f25ef922a4140009bcbedd6b03c8bd26ebcc731141a5bb31b9`;
its start/end stamps are 05:11:57Z and 05:17:53Z on October 7. No raw client
record, session identifier or host path is included here.

**Alternative and revisit condition.** Keeping standing orchestration would
continue letting checkout settings select it for every eligible task. Keeping
it as an explicit task choice preserves the native feature while avoiding that
automatic dispatch. Revisit the choice when a changed native mode, a named
workload or better upstream evidence establishes a different appropriate
default; keep dispatch, information quality and complete usage scopes distinct.

**Sources.** Installed Claude Code 2.1.292's optional Boolean schema is at byte
204350508 of the Linux executable, SHA256
`a967e7b1d8b4e47ee421d5433027880347952b0c0857abf880e2c942a4ec93b3`;
`claude --help` exposes `--settings`. The native schema notes that interactive
toggles do not persist. Primary documentation read October 7:
[setting/default](https://code.claude.com/docs/en/settings-reference.md#L1362-L1379),
[scope precedence](https://code.claude.com/docs/en/settings.md#L631-L635),
[workflow opt-ins and effects](https://code.claude.com/docs/en/workflows.md#L115-L162),
[advisory sizing](https://code.claude.com/docs/en/workflows.md#L416-L447),
[subagents](https://code.claude.com/docs/en/sub-agents.md),
and [experimental teams](https://code.claude.com/docs/en/agent-teams.md).
The [2.1.284 changelog entry at the installed release](https://github.com/anthropics/claude-code/blob/v2.1.292/CHANGELOG.md#L821)
keeps the toggle independent of effort.
8 changes: 8 additions & 0 deletions docs/decisions/2026-09-29-max-default-effort.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,11 @@ Revisit this record when any of these happens:
## Repository rule relocated verbatim (2026-10-05)

- This repository commits `.claude/settings.json` with Ultracode on and `effortLevel: xhigh`, the saved fallback for any model. A terminal session started through the ecosystem `claude` launcher runs the coordinator at `max` (the launcher adds `--effort max` only when nothing chose an effort and the client is 2.1.284 or newer; `claude --effort xhigh` opts out). On Claude Code 2.1.284 Ultracode stays on at any effort level and the `ultracode` setting sets none, so a `max` session keeps its workflow orchestration on; the `max` default rests on the user's requirement, not on a measured gain here. Headless `-p` runs pass `--effort` per call site, and `CLAUDE_CODE_EFFORT_LEVEL` stays unset at every scope (any value overrides every child's effort). Pass `effort: 'max'` with an explicit task-matched `model` on every ad-hoc workflow `agent()` call: a stage that names no effort runs at its agent's frontmatter effort, else at the effort the session was given explicitly (`--effort`, `/effort`, the model picker), else at its model's saved level or default, and one that names no model takes its definition's model, else `CLAUDE_CODE_SUBAGENT_MODEL` (`opus`), else the lead's. `opus` takes judgment; `sonnet` (Sonnet 5.5) takes fan-out units that an executable oracle or a later Opus stage checks (`examples/claude-native/workflows/README.md`, "Sonnet 5.5 fan-out units"). Probes and overturn conditions: `docs/decisions/2026-09-29-max-default-effort.md`, `docs/decisions/2026-09-29-sonnet-5-5-dispatch.md` and `docs/decisions/2026-09-23-max-effort-default.md`.

## Amendment (2026-10-07): orchestration is selected per task

The [September 23 record's dated amendment](2026-09-23-max-effort-default.md#amendment-2026-10-07-select-orchestration-per-task)
supersedes the standing-Ultracode setting retained above. The committed baseline
and portable settings template omit that key; explicit task/session/launch
opt-ins remain available. This amendment changes no model or effort rule, and
does not alter the original measurements or relocated passage contract.
13 changes: 13 additions & 0 deletions docs/decisions/2026-10-02-new-wsl-client-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1107,3 +1107,16 @@ The [local-time decision](2026-10-05-user-facing-local-time.md) adds one sentenc

```text
```

## Amendment (2026-10-07): omit standing Ultracode from the baseline

The [task-dispatch amendment](2026-09-23-max-effort-default.md#amendment-2026-10-07-select-orchestration-per-task)
removes the optional standing `ultracode` input from the portable settings
template. Its native capability-map entry remains valid for an explicit opt-in;
the baseline no longer renders that practice setting.

Today: 397 pieces, 357 wired (206 practice, 151 through a slot), 24 not wired
(0 through a slot that does not install, 24 by their own entry) and 16 authorization
pieces. This is the current repository-input projection from
`python3 tools/adoption/new_wsl_client_config.py --check`, not a new host
installation or client acceptance run. The prior dated counts remain unchanged.
18 changes: 18 additions & 0 deletions examples/claude-native/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ the Codex side.
section) and, when the project keeps usage receipts, `usage_receipts_dir`,
`routing_doc` and `task_record`. A configured path that does not exist fails
the suites; nothing is skipped silently.
**Amendment (2026-10-07).** Use the retained settings example as an explicit
task/launch profile, including for the contract's `settings` path. Persistent
baseline settings omit `ultracode`; do not merge that opt-in key into them.
Follow the [dated dispatch amendment](../../../docs/decisions/2026-09-23-max-effort-default.md#amendment-2026-10-07-select-orchestration-per-task)
when choosing the mode. Other project settings and permission requirements
retain their own scope.
3. Give the session a permission source that covers the Workflow tool. A headless
`claude -p` run of a saved workflow is refused ("Review dynamic workflow before
running", observed in the 2026-09-21 qualification, see
Expand Down Expand Up @@ -1086,6 +1092,18 @@ Applies to the coordinator and every Workflow/Agent child (project agents and `.
- **Usage accounting.** Count each client separately: native `/usage`, `claude agents`/`/workflows` journals, `ccusage` offline reports and `ecosystem-token-report refresh`. Never sum RTK, Context Mode, jCodeMunch, Headroom and provider counters, and never state a savings percentage from a fixture. After a Workflow run, `node .claude/workflows/child-usage.mjs <Transcript dir printed by the Workflow tool>` (or `--latest`) returns each child's requested and resolved model, effort, provider-returned usage and first-prompt size, and exits 1 when a child is null, substituted, named no model or ran an older model than its alias documents (the client resolves a family alias to the lead's exact model when the lead belongs to that family, so a `sonnet` child under a lead pinned to an older Sonnet is flagged too; keep the lead on the alias). An attempt that returned nothing and that the runtime re-ran under the same journal key (a Workflow pauses at a usage limit and re-runs its waiting agents after the reset) is listed under `superseded_attempts`, not as a lost child, and its usage still counts in `by_resolved_model`. Usage such an attempt holds that cannot be counted (an assistant message without provider usage or without a resolved model, or no transcript at all) is its `usage_issues`, and it leaves the run incomplete. Advisor usage lies outside these totals (2026-09-28): subagents inherit the configured advisor ([advisor](https://code.claude.com/docs/en/advisor)), the API reports each advisor call as a `usage.iterations[]` entry of type `advisor_message` and keeps top-level usage executor-only ([advisor tool usage](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#usage-and-billing)), and a run-mode child's `usage` and `by_resolved_model` read only the top-level counters (since 2026-09-29 `lanes.measurement.usage` also reports the advisor iterations, as `advisor_iterations` and `totals_including_advisor`). A count-only scan of one host found 1,018 advisor iterations in 660 of 2,912 subagent transcripts ([receipt](../../../evidence/receipts/claude-advisor-usage-scan-20260928.json)). Take complete session usage from `/usage`, which includes advisor usage, and hold the advisor state equal across comparison arms with `CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1` or `/advisor off`.
- **Cross-family review.** Explicit `/codex:review` or `/codex:adversarial-review --background` at integration points (see `recipes/claude-codex-cooperation-lanes.md`); findings are verified against source, not accepted by agreement.
- **Opt-in and limits.** The `ultracode` keyword starts a workflow only from a prompt typed in the session; it is inert from `-p`, an unstamped SDK prompt, a scheduled task or a relayed comment, so a headless run invokes a saved workflow by name under a settings source whose permission mode or allow rule (`Workflow` or `Workflow(<name>)`) covers the tool. Scripts take no mid-run user input, no `import()` and no `Date.now()`, `Math.random()` or argless `new Date()` (pass timestamps through `args`; run a stage that needs sign-off as its own workflow); one `parallel()`/`pipeline()` call takes at most 4,096 items and a run at most 1,000 agents.
**Amendment (2026-10-07).** Standing Ultracode is off in the portable baseline.
The coordinator selects it per task through the direct interactive keyword,
the nonpersistent `/effort ultracode on|off` session toggle, or launch-scoped
`--settings` (for example `'{"ultracode":true}'`). Workflows stay available and
model/effort choices stay explicit. Before opting in, bound the number of
stages and agents, concurrency, outputs and permitted effects, and name the
verification/recovery steps. Size guidance is advisory; Ultracode suppresses
native large-workflow warnings and the session subagent concurrency limit,
so a task brief must supply its own finite scope. The existing project size
guideline and environment values are unchanged. See the
[decision and observed scopes](../../../docs/decisions/2026-09-23-max-effort-default.md#amendment-2026-10-07-select-orchestration-per-task)
and [native opt-ins](https://code.claude.com/docs/en/workflows.md#L115-L162).
- **Failure and replay.** On resume a failed or stopped agent runs again together with every agent started after it, completed ones included, and a run with nothing cached has nothing to resume; native failure, cancel and recovery remain documented but unobserved (open gate in `docs/native-ultracode-20260921.md`).
- **Agent allowlists and skill preloads.** Block a specific command with a `permissions.deny` Bash rule, never with a specifier inside an agent's `disallowedTools`, which removes the whole tool. A child `skills:` entry preloads the full skill text into its first prompt. Targeted builder and security-reviewer preloads are documented configurations with their own first-prompt sizes unmeasured and preregistered alongside the researcher/verifier rows in the [decision record](../../../docs/decisions/2026-09-26-stack-agents-role-dispatch.md). The [listing-state addendum](../../../docs/decisions/2026-09-25-skills-trial-and-usage.md#addendum-2026-09-26-listing-state-and-agent-preload) probed preload viability on Claude Code 2.1.283 for a pinned, table-listed skill; the builder's plugin-scoped `context-mode:context-mode` preload instead relies on its installed `SKILL.md` carrying no invocation-disabling frontmatter. Neither is a repeat native probe of these specific configurations. The separate Read/Glob/Grep reviewer probe of 2026-09-22 measured 15,059 tokens with one skill; that figure does not qualify these new configurations.
- **Version gates.** A rule that depends on a client version names the version observed when it was recorded. This section was checked against `claude --version` 2.1.278 on 2026-09-22; the official docs fetched that day gate the settings-file size guideline at 2.1.219, `/workflow-authoring` at 2.1.248 and the concurrency setting at 2.1.269. The excerpts those fetches returned (including the stagger default above) are retained in `evidence/artifacts/harness-rules-convergence-20260922/official-doc-excerpts.json`.
Expand Down
Loading
Loading