Context#
- The inquiry folder
prototypes/artefacts/ep295-dr-miadi-mia-parallel-code-as-desktop-ui-2610210643-b1738b73-d460-4a54-9c11-f386fb92009bholds a Perplexity research report, a "Scout handoff" addressed to a "Fork & Integration Team". It reads upstreamjohannesjo/parallel-codeat commit89335533(2026-10-18, the upstreammainhead when this issue was written). - The report corrects one assumption. Parallel Code spawns agents with
node-pty(electron/ipc/pty.ts) and draws them with xterm.js. No.tsfile underelectron/orsrc/mentions tmux (checked at89335533withgit grep -l tmux). Hosting tmux would be new work. - The report describes five framing layers. L1 is the MCP server
instructions(electron/mcp/mcp-tool-list.ts). L2 is tool descriptions and schemas. L3 is the canvas block appended at send time (src/store/tasks.ts,canvasGuidanceDue()). L4 is the peer-message envelope (electron/mcp/delegation.ts). L5 is the child-task prompt. It also describes the phone server on port 7777 with Tailscale detection, the.parallel-code/dotfiles, a proposedframe_pack: v1YAML and a five-step first sprint. - The report is cut off in L3. The keystroke delivery list stops at "Write the Focus-In escape
\x1b". The full sequence appears only as thedelivery_tty` line of the frame-pack YAML. - The report leaves out one channel that still exists at
89335533.electron/mcp/coordinator.tscallsinjectSubTaskPreamble(line 1487) for each coordinated sub-task.electron/mcp/preamble.tswrites the preamble intoAGENTS.md,GEMINI.mdor.agent.md, depending on the agent command.stripPreambleFromBranchremoves it before the branch is merged. - Episode 295 already holds a July reading of the same question,
foundations/prompt-intent-embeddinginmiadisabelle/mia-parallel-code, done at upstream0bc5806(2026-07-21) and followed in miadisabelle/mia-parallel-code#2. That reading foundCOORDINATOR_PREAMBLE(src/store/coordinator-preamble.ts) andSTEPS_INSTRUCTION(src/store/tasks.ts). Both are gone at89335533.electron/shared/canvas-view.tsandelectron/mcp/delegation.tsare new since then. - The fork's
mainis at661e5de, a merge of upstream 3.1.0 through8c09c4c(2026-10-03). It is 195 commits behind89335533(git rev-list --count HEAD..upstream/main). The fork still hasSTEPS_INSTRUCTION, which upstream has since removed. - The report itself says three things are unverified: how the app behaves at runtime, which interface port 7777 actually binds to, and whether each agent CLI's current version shows MCP
instructionsto the model.
Desired State#
miadisabelle/mia-parallel-code has a dated reading of the framing at the upstream commit it runs. In that reading every channel that adds text around user intent is named with its file and function, including the steering-file preamble, and the full terminal delivery sequence is written out. The framing blocks live in one versioned frame-pack module, and a snapshot test records the composed L1 text for each profile. Behind a feature flag, an AgentHost interface can run an agent in a tmux pane through control mode, as well as through node-pty. The same keystroke delivery has been confirmed against Claude Code and Codex. That gives Tide a third multiplexer it can reach, which is the goal episode 295 sets.
Action Steps#
- Read
sendPrompt()insrc/store/tasks.tsand the pty write path inelectron/ipc/pty.tsat89335533, and write out the full L3 delivery sequence (Focus-In, bracketed paste, delay rule, separate\r) that the report leaves unfinished. - Add a sixth channel to the layer model: the coordinator sub-task preamble written into
AGENTS.md/GEMINI.md/.agent.mdand removed bystripPreambleFromBranch. Record which agent command chooses which file. - Add a dated section for
89335533tofoundations/prompt-intent-embeddingin the fork: what was removed since0bc5806, what was added, and what is unchanged. Keep the July reading as history. Add the Perplexity report tosource-ledger.yaml. - On a branch, merge upstream
89335533into the fork. Keep the fork's own changes from miadisabelle/mia-parallel-code#1, miadisabelle/mia-parallel-code#7, miadisabelle/mia-parallel-code#8 and miadisabelle/mia-parallel-code#9, run the test suite, and record the result here. - Move the framing blocks into a frame-pack module without changing behaviour:
serverInstructions,sessionInstructions,selectTools,CANVAS_INSTRUCTIONS,peerEnvelope, and the sub-task preamble. Add a snapshot test of the composed L1 text for each profile (ordinary,child-review,child-automatic). - Find out whether the current Claude Code and Codex versions show MCP
instructionsto the model, with one live session each, and record the CLI version and what the model received. - Build the
AgentHostinterface with anode-ptyadapter (the existing behaviour) and a tmux control-mode adapter (tmux -CC, pane IDs, octal output decoding,refresh-client -C,send-keys -H) behind a feature flag, and confirm the delivery sequence against Claude Code and Codex. - Point
MCPClientat a stub of the Miadi API platform and run one parent with two children end to end, using the integration points specified in miadisabelle/mia-parallel-code#10. - Write a threat model for peer messaging across hosts before anything is exposed beyond Tailscale, starting from the port 7777 reachability work in miadisabelle/mia-parallel-code#4.
Structural Tension#
The October audit gives the fork a layered model of how Parallel Code frames user intent, but that model is incomplete: it leaves out the steering-file preamble and cuts off mid-way through the delivery sequence. It also describes code that the fork has not merged. The steps above verify the model against source, bring the fork to the audited commit, and then build the frame pack and the tmux host on code that has been checked.
Related#
- miadisabelle/Etuaptmumk-RSM#277 (the inquiry: the artefact's content, labelled
inquiry) - miadi-chronicle://295, Parallel Code and the Reachable Tide
- miadi-chronicle://19, Tide Runtime Orchard (lineage of episode 295)
- miadisabelle/mia-parallel-code#2, the July inquiry on the same question
- miadisabelle/mia-parallel-code#3, adopting the fork as a Miadi integration option
- miadisabelle/mia-parallel-code#4, Connect-Phone QR reachable over Tailscale
- miadisabelle/mia-parallel-code#10, rispecs for Parallel Code โ Miadi integration points
- miadisabelle/mia-parallel-code#5, Chronicle awareness in the desktop UI
- jgwill/Miadi#531, tide โ parallel-code bridge
miadisabelle/mia-parallel-code:foundations/prompt-intent-embeddingmiadisabelle/mia-parallel-code:foundations/tide-parallel-code-bridge
Woven into miadi-chronicle://295 (2026-07-23-episode-295-parallel-code-and-the-reachable-tide)