Skip to content

fix: remove the .mode override; mode selection falls through to inference#72

Merged
Jammy2211 merged 2 commits into
mainfrom
fix/remove-mode-file
Jul 15, 2026
Merged

fix: remove the .mode override; mode selection falls through to inference#72
Jammy2211 merged 2 commits into
mainfrom
fix/remove-mode-file

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

The bug

.mode at the repo root is gitignored. PR #34 (e124ab1, Jul 8) removed agent mode and every reference to it — but it physically could not reach a gitignored file, and nothing validates one.

So a sentinel written in June, naming a mode that no longer exists, kept winning the selection chain:

explicit instruction → .modeprofile.md → infer from prompt

.mode said agent, modes/agent.md was deleted, and AGENTS.md said nothing about what to do with an unrecognised value. The assistant improvised. Inference never got a turn — which is what surfaced as "it keeps picking random modes".

Nothing in code reads .mode (no hook, no script, autoassistant/ doesn't touch it), so this is docs-only.

The fix

Chain is now: explicit instruction → profile.md "Interaction mode" → infer from the opening request (fall back to assistant); .maintainer outranks both.

profile.md keeps the durable-override job because it's read and announced every session, so it can't silently rot the way an invisible sentinel did.

AGENTS.md also now states that an unrecognised mode name is not a mode: ignore it, say so in one line, fall through to inference. That rule is the load-bearing half — deleting the local .mode fixes this clone, but other clones still have their own gitignored copy that no commit can reach. With the fall-through rule, a stale agent there degrades to a one-line note instead of undefined behaviour.

Also removed the misleading .mode docs in README.md, the .gitignore entry, and a .mode mention in modes/maintainer.md. The profile template needed no change — it already lists only teacher/assistant and says to leave it unrecorded for inference.

⚠️ Second commit: WIP paper — do not merge as-is

5367918 carries in-progress paper/paper.md edits that were sitting dirty in the working tree, unrelated to this fix. It is not ready:

  • two placeholder stubs — "The first are the wiki pages, which provide the underlying""skills, autolens worksapce.", and a bare "The harness."
  • Benchmark examples and Software design sections deleted pending rewrite
  • unresolved affiliation note in the YAML (# Update to My Newcastle affiliation)
  • retitles PyAutoLens → PyAutoLens-JAX in the summary against the existing @Nightingale2021 citation
  • typos: whilest, worksapce, a line break splitting conversational

Drop 5367918 before merge unless the rewrite lands first. The .mode fix is the parent commit and is independent of it.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits July 15, 2026 15:50
…ence

.mode was gitignored, so PR #34's removal of agent mode could not reach it.
A stale sentinel kept winning the selection chain and resolving to a
modes/agent.md that no longer exists, so inference never ran. Durable mode
preference now lives only in profile.md, which is read and announced each
session.

AGENTS.md now also states that an unrecognised mode name falls through to
inference instead of being improvised on. That rule is the load-bearing
half: deleting the local .mode fixes one clone, but other clones have their
own gitignored copy that no commit can reach.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Snapshot of in-progress paper.md edits, carried along on this branch rather
than left dirty in the working tree. Incomplete: two placeholder stubs
("The first are the wiki pages...", "The harness."), the Benchmark examples
and Software design sections removed pending rewrite, an unresolved
affiliation note, and typos. Retitles PyAutoLens as PyAutoLens-JAX in the
summary against the existing Nightingale2021 citation.

Unrelated to the .mode fix in the parent commit; drop this commit if the
branch is merged before the rewrite lands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f89ec97 into main Jul 15, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the fix/remove-mode-file branch July 15, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant