Conversation
Why: - All-OpenCode floors still launched a hidden Claude session with Claude flags/model (HarnessMD#596). What: - Resolve per-agent or explicitly configured reflection provider, command and model. - Add a bounded no-tools OpenCode adapter and retain the Claude subscription runner. - Classify quota banners and share reset/backoff deadlines without rewriting memory. - Document overrides, adapter limits and reproducible official-CLI validation. Risk: - Safe adapters are Claude and OpenCode; other providers require an explicit supported override. - Cooldowns are in-process; old OpenCode without --pure fails safely. Tests: - 33 focused reflection tests pass; real OpenCode 1.18.34 loopback fixture validates no tools and quota cooldown. - Full suite with HarnessMD#669: 991 passed, 1 skipped, 0 failed; independent suite retains known HarnessMD#652 error. - npm run typecheck, npm run build and git diff --check passed on macOS / Node 24.13.0. Live Docs: - docs/memory-reflection.md, linked from docs/ARCHITECTURE.md.
This was referenced Oct 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Closes #596. Reflection now resolves the worker's provider/model from registry + roster (with explicit
reflectProvider/reflectModel/reflectCommandoverrides), rather than always running the global Claude command with Haiku/Claude flags.run --format jsonadapter, stdin prompt, deny-all-tools primary agent,--pure, disabled sharing and explicit title. Only text events enter the summary; error events take precedence. An explicit title prevents the extra automatic title-model request discovered by the real CLI experiment.rate-limitedwith provider/model/detail/retryAt, not generic parse failures. Calls sharing the same home/provider/binary/model respect a cooldown, including manual reflect; unknown resets back off exponentially. Original memory, pinned facts, newest sections, lossless backups and verification/atomic-swap gates are preserved.unsupported-providerwithout silently launching Claude. An explicit supported reflector override is available for those floors.Before
Same nine MemoryReflector regression scenarios with upstream
f44b986a: 2 pass / 7 fail. Actual node:test output rendered as an image; CLI calls in this unit suite are mocked, memory files and production reflector are real.After
9 pass / 0 fail for the same scenarios. Additional runner/main-wiring/hidden-PTY/parser coverage is listed below.
Validation
macOS / Node 24.13.0:
npm run typecheck,npm run build,git diff --check: passed.OPENCODE_BIN=/path/to/opencode node test/reflect-opencode.manual.cjs: one loopback request with the selected fixture model, stdin → NDJSON → framed summary, zero advertised tools. A second deterministic quota-banner scenario runs through the real CLI and production MemoryReflector: original memory remains byte-identical, reason/deadline are recorded, and the next reflect call issues zero requests.The CLI experiment uses an isolated deterministic OpenAI-compatible fixture, not real inference quality or a real exhausted account. No paid model/backend or account credentials are used. Server SSH timed out on two read-only attempts, so no Linux/A800 runtime or GPU claim is made.
Scope and self-review
docs/memory-reflection.md, linked from the contributor architecture map.--pure; older CLIs fail safely with diagnostic output. Current official help and CLI behavior were checked. CLI reference, permissions, config precedence, Claude tool denial.