Skip to content

mission-control driver: $MODEL is never exported, so the controller cannot read its own routing pin (fallback rule is unreadable every fire) #696

Description

@sunholo-voight-kampff

Recorded at V1 iteration 191 and again at 192, so it is a pattern rather than an incident — but the first diagnosis was imprecise and this issue corrects it.

Measured

tools/launchd/mission-control.sh resolves the controller model into a shell variable MODEL (:215 env pin, :225 override file, :233 probe-ok) and passes it to the session as a flagclaude -p --model "$MODEL". It never exports it:

grep -cE '^[[:space:]]*export MODEL=|^[[:space:]]*export MODEL$'  -> 0
grep -cE '^[[:space:]]*export MISSION_EVALUATOR_MODEL='           -> 1   # known-positive control
grep -c  '^export MISSION_'                                        -> 9   # the vars that ARE exported

So inside the controller session, echo $MODEL is empty on every fire — confirmed live at iterations 191 and 192.

Why it matters (and what it is NOT)

It is not that the controller runs on the wrong model: the --model flag still pins the session. Iteration 191's record says the controller "rode fable-5 by session inheritance because $MODEL was UNSET" — the unset variable is real, but it is not evidence about which model ran, and that record overstates it. Iteration 192 rode opus with $MODEL equally empty.

What it actually breaks is the skill's routing contract, which is written against an exported value:

All three read a variable that is always empty, so the end-of-chain fallback is unreachable as written and the routing-evidence row cannot name the controller's model by measurement. Today that is papered over because the session default happens to match the policy pin — i.e. the invariant holds by luck, not by configuration.

Fix

Export it alongside the nine MISSION_* vars, and export the reason too so the evidence row can cite provenance rather than infer it:

export MODEL MODEL_WHY     # MODEL_WHY is already computed at :215/:225/:233

Then the Gate-4 routing-evidence row can record controller=$MODEL ($MODEL_WHY) as a measurement.

Acceptance

  • MODEL and MODEL_WHY readable inside the controller session (assert non-empty at Gate 0; an empty MODEL should FLAG rather than pass silently).
  • The value matches the --model flag actually passed — one drill where the two disagree must be detectable.

Related: #611 (the ratified fallback chain that terminates at $MODEL), #493 (a different driver-env defect on the same script).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions