Skip to content

Feature 147: teach Facade through MCP instructions and tools only - #112

Open
y5ez3g wants to merge 17 commits into
mainfrom
feature/147-model-texts
Open

y5ez3g wants to merge 17 commits into
mainfrom
feature/147-model-texts

Conversation

@y5ez3g

@y5ez3g y5ez3g commented Nov 24, 2026

Copy link
Copy Markdown
Owner

What this changes

A model now learns how to use Facade from two places only: the MCP server instructions and the eight tool definitions.
The Facade skill is gone. This is Framework only; the legacy implementation is unchanged.

What the model reads

  • Managed agents. Facade starts these. Their instructions open with the one rule the cheapest models got wrong:
    answer a 📨 Message with send_message (to, reply_to, text), because text printed in the terminal never
    reaches the sender.
    • This rule fits inside the first 250 characters. That is all Codex shows before tool search, and Codex trims rows
      from the end when its shared tool list is crowded, so the role sentence comes after the rule in the same line.
    • Three writers (GPT-6.2-Astra, GPT-6.2-Sol and Fable 5.2) wrote the text and all agreed on it.
  • Guests, connections Facade did not start, keep their own shorter instructions.
  • Tool descriptions were rewritten to remove repetition between the instructions, the tools and the skill. The
    catalog is 9.6 KB.
  • On-demand loading. Facade no longer asks any client to load its tools up front: anthropic/alwaysLoad and
    antigravity/alwaysLoad are gone, and Pi's managed entry is deferred.

Terminal messages and notices

  • A message header reads 📨 Message m42 from Ada (a2@devbox) · in reply to m17. The number now comes before the
    sender, the command line shows as command line, and nothing else is added.
  • A 🔔 notice no longer carries a number, since nobody can reply to it. Inbox rows keep their IDs.
  • Every CLI now gets a message as one paste. Claude Code used to get typed lead words before the paste. Claude Code
    wraps long pastes in <pasted_content> and tells the model to act on a message that is only pasted text, so the
    typed lead made a message look like material.
    • In a Haiku/low A/B with a long message: with the lead, 2 of 3 replies were linked; without it, 3 of 3.
    • Drafts typed by an older daemon are still recognized.

Behaviour fixes found by the real-CLI runs

  • A managed agent whose messages Facade types in can no longer wait in read_messages. A timed read fails with a
    clear error telling it to end its turn. A Codex parent had kept its turn open waiting, so its child's reply stayed
    queued.

  • start_agent no longer returns result_message. A parent waited for replies to that notice number, which no reply
    is ever linked to.

  • Codex input is recognized when its footer wraps. Recognized endings:

    • the shortcuts hint;
    • the tab to queue message line shown while Codex works;
    • a right-aligned ⚠ N warning(s) · f2 to view.

    Before this, messages to a working Codex in a narrow terminal ended input_unknown or submission_unconfirmed.

  • A bare agent number or name is now looked up wherever list_agents looks, including saved connections.

  • A new run in a project whose older Antigravity plugin is still in use keeps its managed identity.

  • Failed sends with partly written input give the recipient's address and the resend condition.

Real CLI results (Windows, isolated homes)

Clients: Claude Code 2.1.331, Codex 0.170.0, Antigravity 1.5.15, Muse Code 1.4.25, OpenCode 2.2.4 and Pi 1.4.0. Each
ran on its cheapest model at its lowest effort, plus the Claude and Codex defaults. Real Qwen Code was never run.

On-demand loading. Observed cold managed and Guest requests carried zero inline Facade schemas in Claude Code (with
ToolSearch), Codex, OpenCode and Pi.

  • Antigravity's local assembly shows discovery; its outbound cold payload was not captured.
  • Muse Code 1.4.25 sends all eight schemas on its first request (8,986 bytes). Muse decides this itself, and it was
    accepted.

Codex gpt-6-luna/low, the cheapest model and the reason the managed text was rewritten:

Text Answer one message Guest asks, managed answers
Final draft 0/3 0/3
Final text 3/3 3/3

Each passing round took one discovery and one send.

As a child in the parent-to-child chain, luna answered through Facade in 8 of 10 rounds. The full chain still misses
sometimes on luna/low. The Codex default (gpt-6.2-sol) and the other configurations completed it.

The final matrix had 57 rounds: 32 pass, 4 deviation, 21 fail.

  • Five of the failures were environmental. In all four Claude watchdog rounds and one OpenCode parent round, the
    OpenCode child used to trigger a native approval hit its free daily limit ("Free limit reached"), so it never waited
    for approval.
  • With a Codex child that did stop at its native approval, both Claude Haiku/low watchdog rounds passed:
    • managed: the unnumbered 🔔 arrived about 30 s after the approval prompt, and the parent replied linked to its
      task;
    • Guest: its 30-second read returned the notice.

Validation

The branch is rebased onto 645c94b1 (#111). The 17 commits each hold one concern, with review fixes folded in.

  • Linux check-each-commit.sh passed all 17 rebased commits, including all workspace targets and the lockfile check.
  • Windows scripts\test-all.ps1 passed on the pre-rebase head e154072e: 1,061 passed, 0 failed, 6 ignored by the
    suite. The isolated profile got no writes and no processes were left behind.
    • The rebase leaves the Framework runtime sources, the rules and Cargo.lock byte-identical.
    • After the rebase, the 8 affected Rust scenarios and 2 VS Code Framework integration cases passed on Windows.
  • CI catalog: 417 cases, 277 bound and 140 pending. The base has 141 pending. No assertion, stage or selector was
    dropped, and four new scenario bindings were added.

Known limitations

  • No scenario covers a Guest answering someone else's message, and the Guest first line names no reply_to.
  • Codex gpt-6-luna at low effort sometimes misses the full parent-to-child chain.
  • Muse Code loads all tools up front.

🤖 Generated with Claude Code

Rules owns the CLI catalog, launch choices, and hook formats. Mark which managed runs take instructions from a hook or extension, explain every unsupported launch choice together, and let session hooks format instructions without a skill. Retain the existing entry points for current callers.
Base owns the managed and Guest instructions, the tool definitions, and shared start result formatting. Put run details on the last managed line and tell each caller how replies and notices reach it. Describe the current tool behavior without changing schemas, and call the first message a prompt in start results.
Shell validates run paths and reads hook input. Rules formats the CLI response.

Accept the legacy --skill flag while recording the session with empty stdout. Build the hook response from the managed instructions file alone.
Daemon verifies MCP callers, resolves shared agent targets, and reports what happened to messages. Use the verified run rule to select initialization instructions and serve the shipped tool catalog unchanged. Probe saved routes for unqualified targets without waking machines. Explain send outcomes from the existing receipts and use the Rules diagnostic for unsupported launch choices.
Rules owns the CLI arguments, run files and hooks that deliver MCP tools and instructions. Remove skill distribution and eager-loading metadata, and register Pi tools with deferred exposure. Continue recognizing the old Antigravity plugin member and inherited OpenCode skill path.
Describe the machines searched for a bare number or name and the ambiguity rule for literal names containing an at sign.
Keep the six CLI integration and takeover scenarios tied to how a managed run receives its tools and instructions. Exercise the old hook and plugin formats, verify passive address lookup with a previous Framework build, and refresh the MCP responses.
Describe the managed and Guest instruction sources, client exposure of tools, and reachable lookups by agent number or name.
Base provides the managed and Guest instructions and the MCP tool definitions. Remove the old skill text and its public export now that callers use the instructions and tool descriptions.
Keep the tool descriptions and instructions within the UTF-8, Unicode and UTF-16 limits of model clients. Exercise both reach sentences with long managed run values.
Run preparation owns the shared plugin and decides whether a launch can use its relay credential. Let a new run register its credential when a held same-version plugin has the retired skill as its only extra file and all current templates are regular files with identical bytes. Keep the ordinary edit classification for replacement and cleaning.
Render linked replies with the original message address and show command-line reply addresses in the sender field. Drop the terminal notice number and align the paste lead and start tool description with the new presentation.
The prompt reader uses the model footer to locate the end of input. When the shortcuts hint follows a wrapped footer, recognize the model line at the top of the indented block with a blank divider above it. Keep a minimal recorded screen with a redacted path and title.
Teach the current terminal message format, the linked reply action, and unnumbered notices. Keep the run-specific reach and identity line appended to the fixed instructions.
Let the managed turn end so incoming terminal input can run. Return before checking the inbox and keep timed reads for guests and managed CLIs without terminal message delivery.
Return the launched agent data from start_agent. Keep the reserved prompt notice number in the daemon start receipt and inbox. Verify the same number across remote forwarding and delivery, and check the MCP response against its golden file.
Keep the message header and body together inside Claude Code long-paste tags. During recovery, recognize either previously written Claude prefix with its paste placeholder and keep the existing deadline and single submission.

This branch has not been deployed

No deployments
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