# Cross-review: v4.1.2 pane-resolution / idle-reuse PATCH

- **Reviewer**: `reviewer-creator-grok-01`
- **Job**: `c9796d8c`
- **Source**: `bug-report/mam_upstream_bug_fix_report.md` plus live `lib.sh` / `opencode.py` / tests / `VERSIONS.md` (working tree vs `a18f9f8`)
- **Method**: each of the four report items was re-derived from source, not from the field report or `plan-c107763c.md` at face value.

---

## The four reported issues

| # | Report | Independent finding | Landed? |
|---|---|---|---|
| 1 | `_resolve_herdr_pane_id` generic `agent_kind` fallback misattributes an unrelated same-kind pane | **Real.** YAML-derived kind + `len(matching)==1` returns a foreign pane (e.g. live orchestrator `agy` for dead `creator-agy-01`). `has-session` then skips restore. | **Fixed.** Kind fallback gated on `tn == agent_kind or tsa == agent_kind`. Exact-match loop no longer keys on `'agent'`, so a bare-kind search cannot skip the R-1 multi-match fail-closed. Tests: `test_r2_*`, `test_r3_*`. |
| 2 | `opencode.py::resume_spec` should drop the `materialized` gate | **Not a defect of that form.** `__main__.py` `resume-spec` sets `mat = adapter.verify_artifact(uuid, ctx)` when workspace+uuid are present; `resume_session.sh` always passes `$WORKSPACE`. Stripping the gate would send `--session` for unverified ids. | **Correctly not applied.** Changelog documents the rejection. |
| 3 | `ready_tokens` ASCII banner | **Already fixed in v4.1.1.** Live string is already `'OpenCode\|Chat\|Ask anything\|tab agents\|ctrl\\+p\|Build auto\|commands'`. | **No action (stale report).** |
| 4 | `new-session` never reuses an idle pane | **Real.** Existing-ws path always split. | **Fixed.** First idle (`not p.get('agent')`) pane becomes `target_pane`; otherwise existing layout/split/overflow. Finding A: `$env_flags` + `HERDR_WORKSPACE_ID` replayed via `env` prefix on `$final_cmd` so reuse does not drop documented `KEY=VAL` tokens. Tests: `test_h24_*`, `test_h25_*`. |

## Issue 2 — extra note (does not change the reject)

The plan/changelog line that all five adapters share *the same* `if materialized and session_uuid` shape is slightly overstated: `claude.py` and `grok.py` still attach the uuid on a non-materialized path (`--session-id`). `agy` / `hermes` / `opencode` do not. That does not make the proposed opencode-only gate removal the right PATCH; it means a later diagnostic of a real resume miss should log `verify_artifact`, not delete the gate.

## SemVer v4.1.2 PATCH

Correct class (internal reliability; no public `--agent` / flag / YAML own-key change). Lockstep:

- `lib.sh:32` `MAM_VERSION="4.1.2"`
- `VERSIONS.md` header `v4.1.2`, matrix prose `v4.1.2`, 8 rows, changelog `### 🛠️ \`v4.1.2\`` (v4.1.1 section preserved)
- 8× `SKILL.md` `version: 4.1.2`

## Tests (this reviewer)

```
pytest tests/test_c1_tui_readiness.py tests/test_herdr_shim_contract.py \
       tests/test_version_consistency.py tests/test_a4_adapter_contract.py \
       tests/test_b19_headless_reconcile_fixes.py tests/test_tier2_component.py -q
→ 123 passed in 218.97s
```

`bash -n .agents/skills/lib.sh` clean.

## Residual nits (do not block)

- `${env_flags//--env /}` + unquoted `env $idle_env $final_cmd` still word-splits; same class of quoting the split path already had. Out of PATCH scope as the plan states.
- Current-release overview dropped the v4.1.1 architecture bullets (changelog for 4.1.1 remains).
- `commands`/`Chat` remain generic strong tokens (v4.1.1 leftover).

No `[ESCALATE: PLANNER]`.

---

[VERDICT: PASS]
