Skip to content

fix(wake-config): stop dropping per-peer baseInstructions - #98

Open
alexanderyswork wants to merge 2 commits into
alexfrmn:mainfrom
alexanderyswork:fix/wake-config-base-instructions
Open

fix(wake-config): stop dropping per-peer baseInstructions#98
alexanderyswork wants to merge 2 commits into
alexfrmn:mainfrom
alexanderyswork:fix/wake-config-base-instructions

Conversation

@alexanderyswork

Copy link
Copy Markdown

Small companion to #97, found while trying to give a Codex peer a channel role.

Problem

createChannelThreadStartBindingResolver falls back to peer.baseInstructions when no baseInstructionsResolver is injected — which is exactly how murmur-daemon.mjs wires it. But normalizeWakeConfig dropped the field, so per-peer role instructions could not be set from a real config at all.

That leaves personaId as the only lever for a role, and Codex CLI 0.145 refuses free-form personas:

codex-app-server-error:Invalid request: unknown variant `critic`,
expected one of `none`, `friendly`, `pragmatic`

Net effect: channel roles were unusable end to end — the server rejects arbitrary personas, and the instructions that would express the role never survived config normalization.

Change

normalizeWakeConfig preserves a non-empty string baseInstructions, mirroring the resume fix in #97.

Verified live: before, the daemon logged hasBaseInstructions: false for a channel member; after, hasBaseInstructions: true, and the member's model from the roster is applied.

Test

normalizeWakeConfig preserves per-peer baseInstructions — red before the change. node --test tests/codex-app-server-wake.test.mjs → 20/20.

Note for the docs

It may be worth documenting that personaId in a channel roster cannot be a free-form label for Codex targets: the app-server validates it against none|friendly|pragmatic and fails the whole turn otherwise. Role wording belongs in baseInstructions.

🤖 Generated with Claude Code

Alexander Shalaev and others added 2 commits July 27, 2026 22:45
…ip resume

A thread seeded inside the wake call has no rollout file until its first turn,
so thread/resume always failed on it with 'no rollout found'. That failure left
threadPath null, which silently disabled the session-log completion fallback —
the only path that actually completes a turn on Codex CLI 0.145. Result: Codex
answered, the answer sat in the session JSONL, and the daemon timed out without
relaying it.

- buildThreadStartParams now carries peer cwd/model, so a seeded thread no
  longer starts in / with no project instructions or workspace roots
- the thread/start response path is kept as threadPath (it was discarded)
- a freshly seeded thread is no longer resumed; re-seed shares one code path
- normalizeWakeConfig preserves the resume flag, which it dropped entirely,
  making the injector's resume opt-out unreachable from real config

Tests cover the gap that broke in production: relayFinalToMurmur with no
threadId configured.

Refs alexfrmn#96

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The channel binding resolver falls back to peer.baseInstructions when no
baseInstructionsResolver is injected — which is exactly how murmur-daemon wires
it. normalizeWakeConfig dropped the field, so per-peer role instructions were
impossible to set from a real config.

That left personaId as the only lever, and Codex CLI 0.145 rejects anything
outside its own enum:

  codex-app-server-error:Invalid request: unknown variant `critic`,
  expected one of `none`, `friendly`, `pragmatic`

So channel roles could not be expressed at all: free-form personas are refused
by the server and instructions never reached it. With this change a peer can
carry role instructions and the binding logs hasBaseInstructions: true.

Refs alexfrmn#96

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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