feat(6.30): API-parse-error callout + inline ⚠ + architect-always-unattended#37
Merged
fstamatelopoulos merged 4 commits intomainfrom May 9, 2026
Merged
Conversation
…ttended
UI changes for the third-party-harness + ollama-adapter warnings, driven
by a refined understanding of the gemma4:31b failure mode (item 6.30).
**Refined finding from re-test (2026-05-08, post-v0.20.0)**: same
gemma4:31b model, two routes:
- claude-code-ollama → fails with `API Error: Content block not found`
(Anthropic-strict Messages API parser rejects the model's output)
- opencode-ollama → wrote all four documenter files cleanly
The model IS capable; the strict-Anthropic-shape translation layer is
what rejects its output. Re-confirmed after the v0.20.0 process-tree
fix landed, so it's not a queue-starvation confound.
**What landed:**
- New `isApiParseRisk(adapter)` helper in `@cfcf/core`, sister to the
existing `isClaudeCodeHarnessRisk`. 4 unit tests added.
- `HarnessPolicyWarning` (web Settings + workspace Config) now renders
THREE callouts in order: yellow policy ⚠, blue API-parse-error ℹ
(NEW), blue log-visibility ℹ. The new callout fires whenever any
unattended role is on claude-code-ollama; recommends switching to
opencode-ollama for the same model when the parse error bites.
- Inline ⚠ glyph next to the adapter selector for any unattended row
on `claude-code` (direct). Visual link between the row and the
yellow callout below the table. Scoped to unattended roles only —
PA and HA rows don't flag (they're allowed-interactive scope).
Hover-text explains it.
- `UNATTENDED_ROLE_NAMES` in @cfcf/core now always includes
"architect". Previously the call sites (web + CLI) gated architect
on `autoReviewSpecs=true`, but that was too narrow: the loop also
invokes architect on `refine_plan` resume actions and judge
NEEDS_REFINEMENT verdicts. The same adapter setting drives all
three loop paths AND the manual `cfcf review` path, so the worst
case (loop-invoked) is what we have to warn for. Test in
`adapters.test.ts` updated.
- `cfcf init` banner mirrors the web changes: three notices in the
same order; same role-always-architect handling.
- `docs/guides/anthropic-policy.md` documenter row updated with the
refined finding: two workable paths (coder-tuned on claude-code-
ollama, OR any model on opencode-ollama).
- `docs/plan.md` 6.30 marked ✅ shipped with full scope summary.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion cleanup to ccd853e. After verifying that ALL architect spawn paths are headless (`runReview` / `runReviewSync` → `spawnProcess` with `stdout: "pipe"` + log file; `cfcf review` is just a polling client to a server-side background spawn — there's no `stdio: "inherit"` anywhere in the architect path), the "manually-invoked SA is interactive" framing was wrong. Surfaces fixed: - `createDefaultConfig` (`packages/core/src/config.ts`): architect default flips from claude-code to a policy-clean adapter via `pickUnattendedDefault()` — same logic as dev/judge/documenter. Fresh installs no longer immediately fire the policy warning on the architect row. Comment updated with the correction. PA + HA remain claude-code-default (they ARE truly interactive — they use `Bun.spawn` with `stdio: "inherit"` so the agent's TUI takes over the user's shell). Test in `config.test.ts` updated to match. - `cfcf doctor` `checkHarnessPolicy`: drops the `config.autoReviewSpecs &&` gate on the architect risk check and the "(autoReviewSpecs=true)" label suffix. Same reasoning: loop invokes architect unattended in three paths AND `cfcf review` is also unattended in the spawn-pattern sense. - `docs/guides/anthropic-policy.md` TL;DR + violation-pattern enumeration + role-recommendations table + "verify" instructions: architect moved to the unattended bucket; "manually-invoked Solution Architect" no longer claimed as interactive scope. Adds an explicit note that the only `stdio: "inherit"` paths are PA (cfcf spec) and HA (cfcf help assistant). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…outs
The "Affected roles: dev, documenter, architect" line in the log-
visibility callout read as if judge + reflection were exempt — they
aren't. They'd buffer the same way if you set them to claude-code-ollama;
the line was just listing currently-configured roles on that adapter.
Wording fix in both blue info callouts (log-visibility + the new
API-parse-error from this branch):
- Add an explicit "Applies to any unattended role on
claude-code-ollama (dev / judge / reflection / documenter /
architect). PA and HA are unaffected." line that states the
universal scope upfront.
- Rename "Affected role(s):" to "Currently configured for:" so the
dynamic list reads as "your current config" rather than "the
definitive set of affected roles".
CLI `cfcf init` banner mirrors the web wording (kept in sync per
docstring on HarnessPolicyWarning.tsx).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
"TUI" (Terminal User Interface) is fine in code comments and the
long-form anthropic-policy guide where the audience is technical, but
it's jargon for an inline warning a user reads while configuring a
workspace. Replaced in the two blue info callouts (web Settings +
workspace Config via shared HarnessPolicyWarning component) and in the
mirrored CLI `cfcf init` banner.
Old: "PA and HA are unaffected — their TUI takes over your shell."
New: "PA and HA are unaffected — they run interactively in your
terminal, so you see output live as the agent works."
Code comments + design-doc TUI mentions left as-is — those audiences
expect the term.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Refines the policy/UX warnings around adapter choice for unattended roles. Driven by a re-test of the gemma4:31b documenter failure (item 6.30) which surfaced two findings:
claude-code-ollama + gemma4:31b→ fails withAPI Error: Content block not found.opencode-ollama + gemma4:31b→ wrote all four documenter files cleanly. The OpenAI-compatible endpoint tolerates variance in tool-call output that Anthropic's parser rejects.cfcf review. Verified in code: ALL architect spawns (pre-loop autoReviewSpecs, mid-loop refine_plan, manualcfcf review) usespawnProcesswithstdout: "pipe"+ log file. There's nostdio: "inherit"anywhere in the architect path. Thecfcf reviewCLI is just a polling client to a server-side background spawn. PA + HA are the only two roles that actually take over the user's shell.What's new
claude-code-ollama. Recommends switching toopencode-ollamafor the same model when the parse error bites.claude-code(direct). Visual link between the row and the yellow policy callout below the table. Scoped to unattended roles only — PA and HA rows don't flag.autoReviewSpecs=truequalifier on the architect role label across all surfaces (web Settings + workspace Config +cfcf init+cfcf doctor).isApiParseRisk(adapter)helper in@cfcf/core, sister to existingisClaudeCodeHarnessRisk. Tests added.claude-code-ollama(dev, judge, reflection, documenter, architect). PA and HA are unaffected — they run interactively in your terminal, so you see output live as the agent works." Plus "Currently configured for: …" replaces the previous "Affected roles: …" label so the dynamic list reads as your config rather than the definitive set.Behavior changes
cfcf init: architect role now defaults to a policy-clean adapter (codexor first available) instead ofclaude-code. Existing user configs are unaffected.cfcf doctor: now flagsarchitectas risky whenever its adapter isclaude-code(previously only whenautoReviewSpecs=true).Docs
docs/guides/anthropic-policy.mdupdated: TL;DR, role-recommendations table, violation-pattern paragraph, "verify" instructions all now correctly classify architect as unattended.docs/plan.md: 6.30 marked ✅ shipped with refined-finding summary; iter-6 active-set callout updated.Test plan
bun run typecheck— cleanbun test— 774/774 passcd packages/web && bun run build— cleanapp.test.tsconfig-merge failure on main verified unrelated (viagit stash && bun test)cfcf init --forceconfirm new banner wording mirrors web