Skip to content

Terminal defaults in the repository: Claude overlay, Codex [tui] list, profile example, --login-shell; repairs of the #498 re-check - #510

Merged
seathatflowsinourveins merged 2 commits into
mainfrom
claude/wsl-terminal-defaults-20260929
Sep 29, 2026
Merged

seathatflowsinourveins merged 2 commits into
mainfrom
claude/wsl-terminal-defaults-20260929

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes, in one or two sentences: carries the terminal defaults of the 2026-09-28/29 decision in the repository, so a new session or host takes them from the templates and docs instead of a host edit (a Linux/WSL2 Claude Code settings overlay, a Codex [tui] notifications list, a Windows Terminal profile fragment example, a static scripts/adoption_status.py --login-shell check, and a platform-page section), and repairs six defects that a bounded Opus re-check found in the already merged login-shell change (Login shell contract, launch practice and landscape refresh (2026-09-29) #498).
  • Base commit: be97e882 (origin/main at the last rebase)
  • Lane: lane:foundation
  • Owned paths touched: adoption/platforms/linux-wsl2.md, adoption/templates/, examples/claude-native/, recipes/claude-native-profile.md, scripts/adoption_status.py, tests/, docs/decisions/2026-09-28-terminal-experience.md, docs/harness-defaults.md (two anti-pattern rows), evidence/receipts/, evidence/artifacts/login-shell-contract-20260929/, evidence/artifacts/wsl-terminal-defaults-20260929/, and manifests/evidence.json (hot-file protocol: main's copy, the two receipt entries and the hashes of the changed files).
  • Authorship: written by a Claude Sonnet 5.5 coordinator session, hence the commit trailer. Reviewed by headless Opus reviewers at effort max (two lenses in round 1, two in a round-2 re-check of the repair); the Codex GPT-6 round could not run; see Review.
  • Release note: the new and changed adoption files are not in the pinned release, so a new host gets them only after a release carries them and the manifest is re-pinned (scripts/release_due.py already lists earlier unreleased paths). The platform page says so in its own words ("added after v2026.09.26.2").

SOTA sources

  • Bash login startup order: GNU bash 5.3 (bash-5.3.tar.gz, ftp.gnu.org) shell.c execute_profile_file L1116-1127 and builtins/evalfile.c maybe_execute_file / evalfile_internal (a missing file returns 0, an empty file, a directory and any other open error return nonzero, so the first file that exists ends the search); GNU Bash Reference Manual, "Bash Startup Files". The new static check is verified against the installed bash 5.2.21 itself (343 combinations), since bash offers no query API.
  • Windows Terminal: JSON fragment extensions (folder %LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\{app-name}\, a profile guid is optional) and advanced profile settings (bellStyle, closeOnExit, suppressApplicationTitle), both fetched 2026-09-29; microsoft/terminal v1.24.11911.0 src/cascadia/TerminalSettingsModel/Profile.cpp L302-317 (_GenerateGuidForProfile) and CascadiaSettingsSerialization.cpp L1038-1041 (a fragment profile with no GUID gets a stable one from its name and source).
  • Claude Code 2.1.284: settings reference (preferredNotifChannel notifications_disabled), hooks reference (terminalSequence, Notification types), environment variables (CLAUDE_CODE_TMPDIR, CLAUDE_CODE_SUBPROCESS_ENV_SCRUB), errors page (stale sandbox mask files), CHANGELOG entries 2.1.69, 2.1.83, 2.1.98, 2.1.141 and 2.1.257, and the installed binary's startup code (read by startup_placeholder_names.py).
  • openai/codex rust-v0.157.1 (installed) and rust-v0.155.1 (the macOS pin): codex-rs/tui/src/chatwidget/notifications.rs type_name() for the notification kinds; the installed codex --strict-config for what a configuration accepts (measured).
  • anthropics/claude-code issues #76236 and #78072, read only; nothing was filed or commented.
  • No code was written where a maintained upstream tool exists: the overlay is applied by the repository's existing tools/adoption/apply_claude_settings.py, the profiles use Windows Terminal's documented fragment mechanism, and the --login-shell flag extends the existing scripts/adoption_status.py because no upstream equivalent exists.

Evidence-class table

Claim Evidence class Command / receipt
Merging the overlay into the live Claude settings changes nothing, exactly one Notification group holds the bell command and its matcher equals the overlay's native_proven (the repository's merge tool, --dry-run, plus a matcher check the merge cannot make) receipt wsl-terminal-defaults-20260929 data.overlay_merge_against_live_settings; overlay_noop_check.py
The rendered Codex template loads under the installed Codex's --strict-config; a wrong type and an unknown top-level key are refused, an unknown key inside [tui] is not native_proven (Codex 0.157.1; the run stops at authentication) receipt data.codex_strict_config; codex_tui_strict_check.py
The static login-shell model equals the real bash login search in 512 of 512 combinations over eight states, a FIFO and three stat-error cases (ELOOP, ENOTDIR, EACCES) agree too, and a wrong model disagrees in 26 native_proven (bash 5.2.21, control arm) receipt data.login_shell_model_against_real_bash; login_shell_bash_truth.py; LoginShellTests
The second distro's two per-project Claude profiles and settings follow the policy; every other profile and setting is unchanged; the installed hook prints one BEL native_proven (before and after, values only) receipt data.second_distro
The host check scans the live settings file, passes, fails the pre-change file with 8 findings, and each of 22 single-defect controls (9 fragment, 10 settings, 3 overrides under a derived GUID) fails for exactly its rule native_proven (real host) plus synthetic (mutants) receipt data.practice_repository (the practice repository has no remote)
The reproduction now writes only inside its private directories (the real /tmp and /tmp/claude-<uid> gained no top-level entry), and the native claude doctor warning can fire but never names the scrub-created file native_proven (installed client, throwaway homes, positive control) receipt login-shell-contract-20260929 data.isolated_reproduction
The profile example follows the policy local_integration (JSON against tests with negative controls; not loaded into Windows Terminal) tests/test_windows_terminal_defaults.py
The unit tests pass local_integration 214 tests OK in the five affected modules on Python 3.13 and 3.12; the full suite ran 7593 tests, and its 11 failures were SIGINT-delivery tests that fail only under a backgrounded runner and pass in the foreground (22 and 231 tests)

Local commands run

$ python3 scripts/validate.py
exit 0: {"components": 69, "hashed_files": 8154, "profiles": 4, "receipts": 172, "status": "passed"}
$ python3 scripts/validate_foundation.py ; python3 scripts/component_matrix.py --check ; python3 scripts/new_host_grand_list.py --check
exit 0, 0 and 0
$ python3 -B -m unittest tests.test_adoption_status tests.test_windows_terminal_defaults tests.test_adoption_docs_consistency tests.test_render_config tests.test_apply_claude_settings   (Python 3.13.15 and /usr/bin/python3.12)
Ran 214 tests ... OK (skipped=1)
$ python3 -B evidence/artifacts/wsl-terminal-defaults-20260929/login_shell_bash_truth.py .
combinations checked: 512 | mismatches: 0 | negative control disagrees in 26 combinations (plus the FIFO and stat-error cases)
$ python3 -B evidence/artifacts/login-shell-contract-20260929/scrub_placeholder_probe.py
the real /tmp and /tmp/claude-<uid> gained 0 top-level entries; native doctor 3 warnings (sandbox off) and 4 (sandbox on, planted stale mask file named)

Decision record

docs/decisions/2026-09-28-terminal-experience.md: the new section "Repository-carried defaults and the second distro's profiles (2026-09-29)" (decisions with rejected alternatives and overturn conditions) and "Corrections after the bounded re-check (2026-09-29)".

Host evidence

This PR adds no file under evidence/hosts/.

  • python3 scripts/host_receipts.py validate is part of scripts/validate.py, which passes.
  • Independent review is recorded in this description (Review).
  • No platform_status change is made from a host receipt alone.

Review

  • Round 1 (headless Opus, effort max, read-only, a frozen checkout of the first head, two lenses): reviewer A (behaviour and tests against bash itself, receipt and evidence accuracy, publication hygiene, host-side state) returned 11 findings (4 medium, 7 low) and changes-needed; reviewer B (every upstream-behaviour claim against its primary source) returned 8 (3 medium, 5 low) and changes-needed. All were accepted and repaired. The ones that changed behaviour or evidence:
    • the repaired probe still wrote to the real /tmp when the caller's TMPDIR made its private path too long for the client's messaging socket (the client then falls back to a fixed /tmp/cc-socks-<uid> directory): the scratch path is now short and guarded, and a control probe shows both cases;
    • the overlay acceptance oracle could not see the Notification matcher (the merge de-duplicates hooks by command, so a catch-all group or an older matcher merges to itself): it now checks the group count and the matcher, a test proves it refuses both wrong hosts, and the platform page says a later matcher change needs the old group edited first;
    • the shared Codex [tui] notifications list also reaches macOS hosts: decided and documented (decision row, macOS page, bootstrap step 4);
    • --login-shell: an unusable ~/.profile is reported as not read, an unresolvable HOME is no longer a traceback, the special-file wording was wrong (a device reads as empty, a FIFO blocks), and ELOOP, ENOTDIR, EACCES, /dev/null and FIFO cases were added against real bash;
    • the doctor's silence about the scrub-created file follows from the warning's documented scope (0-byte read-only placeholders); the planted file only proves the warning is live.
  • Round 2 (the one bounded re-check of that repair: two fresh headless Opus reviewers at effort max on the head after round 1, lenses split between behaviour and evidence and upstream sources): reviewer C returned 11 entries and reviewer D 8, both changes-needed, all low or medium, none high. All were verified against source and repaired; each repair carries its own check:
    • a claim of mine that an open Claude Code session "keeps the hooks it started with" was wrong (settings reference, "When edits take effect": hooks hot-reload); removed, and the real limit (no bell was observed) stays;
    • the socket-fallback condition is stated on the client's own 103-byte cap of <dir>/cc-socks/<pid>.sock (about 81 bytes of private path with a 7-digit pid; the control used 99), with XDG_RUNTIME_DIR left unset; the probes now report the shared file and refuse to interpret a run when a fallback directory already existed;
    • --login-shell falls back to / for HOME the way bash does; three mutants the review found alive (cwd instead of the passwd home, profile_read only for content, no root fallback) are now killed by tests, shown by rerunning each mutant;
    • the practice repository's check now derives the GUID of a fragment profile that declares none (the first fix let an override under that GUID pass unchecked: shown at exit 0 before, exit 1 now), with three mutant controls (22 in all) computed from Microsoft's recipe independently;
    • the second distro's binary is shown byte-identical to this host's 2.1.283 (SHA-256 prefix) with occurrence counts; request_user_input questions notify as plan-mode-prompt at both Codex tags (tool_requests.rs L449-458), so no notification the macOS pin emits is lost; a profile's environment replaces profiles.defaults.environment; the .env* working-directory placeholder list is named.
      There is no third round. Residuals are in the receipts' limitations: no Windows Terminal tab or bell was observed, nothing was run on a Mac, and the second distro's open sessions were not observed picking the overlay up.
  • Codex GPT-6 cross-family round: not run. On 2026-09-29 at about 14:00Z the native Codex account answered "You've hit your usage limit ... try again at Oct 3rd, 2026 8:35 PM", and the OmniRoute pool answered 429 Too Many Requests with every one of its six weekly windows at 99-100%. That is a retained failure of the lane, not a skipped review; the user was notified. The round runs on the merged commit when a login or the reset restores the lane.

Checklist

  • New/changed GitHub Actions are pinned to a full commit SHA with a version comment (no workflow is changed).
  • New/changed workflows declare top-level permissions: contents: read (no workflow is changed).
  • No secrets are printed, logged or committed; no new required secret was added. The added lines were scanned for user names, home paths, GUIDs, credential shapes and e-mail addresses: 0 hits.
  • No new paid hosting, subscription or billing surface was introduced.
  • Peer-owned untracked files and worktrees were preserved (not deleted, moved or overwritten).

🤖 Generated with Claude Code

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 29, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Scout and others added 2 commits September 29, 2026 12:11
…, profile example, --login-shell; repairs of the #498 re-check

Carries the terminal decision of 2026-09-28/29 in the repository so a new session or host takes it from templates and docs instead of a host edit:
- adoption/templates/claude.settings.linux-wsl2.overlay.json (preferredNotifChannel + one Notification hook that rings for a needed action only), merged
  with tools/adoption/apply_claude_settings.py; the acceptance script also checks the bell group's count and matcher, which the merge cannot see;
- [tui] notifications in the shared Codex template (needed-action kinds; decided for macOS hosts too);
- examples/claude-native/windows-terminal.fragment.example.json and the recipe's Claude profile entry (own titles, quiet explicit bell, truecolor, login shell);
- scripts/adoption_status.py --login-shell: which of ~/.bash_profile, ~/.bash_login, ~/.profile a Bash login shell reads first, from file metadata only,
  checked against the real bash over 512 startup-file combinations plus FIFO and stat-error cases;
- a Windows Terminal profiles and login shell section in adoption/platforms/linux-wsl2.md, a macOS note and a bootstrap step 4 note;
- the decision record's Repository-carried defaults section, the receipt wsl-terminal-defaults-20260929 and its acceptance scripts.

Repairs the defects two bounded reviews of the merged login-shell change (#498) and of this change found: the reproduction probe keeps the client's temp state
in a short private directory (a longer path makes the client use a fixed /tmp/cc-socks-<uid> directory) and measures the real temp dirs; the native doctor's
silence about the scrub-created file follows from its documented scope; the changelog list, the startup placeholder names and the candidate pins have producing
scripts or baselines; two anti-pattern rows are logged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…pt and the changed files' hashes (hot-file protocol)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/wsl-terminal-defaults-20260929 branch from 4858b10 to bc925b3 Compare September 29, 2026 16:13
@seathatflowsinourveins
seathatflowsinourveins merged commit fca73de into main Sep 29, 2026
27 of 30 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/wsl-terminal-defaults-20260929 branch September 29, 2026 16:36
seathatflowsinourveins pushed a commit that referenced this pull request Sep 30, 2026
…ough the packaged Codex lane on OmniRoute), 46 findings checked, 39 repaired

Nine read-only jobs (#484, #498, #510, #519; two lenses each, #519 in three parts) returned 46 findings (3 high, 34 medium, 9 low). Each was graded by an independent Claude verifier
(23: 17 confirmed, 4 partly, 2 refuted) or checked by the coordinator against the code or the upstream source before any change; 39 led to a repair, 2 were refuted, 3 concerned the removed
second-distro target, 2 duplicates of one convention were kept.

Repairs, each with a control that fails without it: the settings-swap tool installs only over the bytes it read, refuses keys beyond matcher and hooks and prints no matcher value (24 controls,
15 mutant runs); the notification-type scan resolves the catalog's spread identifier instead of choosing an array by contents (eight reader tests, seven mutants); the login-shell check needs an
answer for every command and an end marker, uses type -P and lets only the first startup file bash reads shadow ~/.profile; the digest, Codex strict-config, overlay, tmux and pty probes exit
nonzero when they measured nothing (selftests, an end-to-end SIGTERM case with a negative control); the BEL counter ignores UTF-8 C1 characters like the pinned output engine; the colour counter
counts SGR only; the 512-combination bash oracle compares first_read; the practice repository's sound rule is exact.

Wording corrected: tmux has a sync feature (measured); the bell icon clears after about 2 s on a focused tab; the push presence rule is for a local session; a profiles.defaults key beats a
fragment-only profile; a terminal's permission notification is timed by inactivity (the fixed-delay timer is the Agent SDK path, which the coordinator's own earlier correction had confused).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Sep 30, 2026
… (gpt-6.1-sol and gpt-6-astra-ultra through the packaged Codex lane on OmniRoute) (#532)

Nine read-only jobs of the packaged Codex lane (gpt-6.1-sol, effort max, through the local OmniRoute gateway) reviewed the four merged terminal-lane pull requests (#484, #498, #510, #519)
and returned 46 findings; each was graded by an independent Claude verifier or checked against the code or the upstream source before any change (39 repaired, 2 refuted, 3 removed with the
second-distro target, 2 kept). A bounded re-check of those repairs (three gpt-6.1-sol jobs and one gpt-6-astra-ultra job) returned 33 more findings (19 graded: 16 confirmed, 3 partly), all repaired in a
fifth round: a false recovery claim in the settings-swap tool, signal handling that still left the client behind (first signal wins, deferred cleanups, client created under a spawn flag, a mutant
runner that shows each case failing without its guard), controls that could not fail, two claims without a recorded rerun. Adds the sanitized review record, a receipt with the re-check data, a correction
note in the four older receipts and native reruns of the scrub probe and the PATH digest.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant