CSE Roadmap

Specialist tier · about 8 hours · 12 parts

Part 3 of 12 · 3 min read

The harness loop

A notary does not act on what a document claims about itself; they read the document and work out what it would actually do if signed. The harness treats every proposed click the same way, because the agent's own account of a click is not evidence.

In plain words: judge an action by the request it would actually send, worked out from the browser's own state, never by the agent's description of what it meant to do.

AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTo4NTA0MTZiOS1iNzM3LTRkNGMtYmY4My04ODk1NDQ4N2E3NjkAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaGqWfOArJLx/Hg/FRGqbe3gAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo1YWJmMzA3My02ZTI5LTQ1NzgtOTE2My03ZTUyYmFkM2FmMTBscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoHp+j17U4WJtVuczBrQuc/AAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFgg+LBhXooKs9DLUqQ9VFv7uRd1E1GbwZ/7ZEjCAN2Oju6kZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlv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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQDmbCSMdRqo/Y04vpS1UPKaS5Lz7gipQeFi+deoHS9R6CfVcixHR4BZ0hjWs31dYI3VxviAlgxEQ4xtoZ0esWXY=Every action is judged by what it would do, not by what the agent says it is doingagent proposesclick 'Place order'plan_clickwhich element? which request?guard layershygiene, hosts, contractconfirmthe person sees the real detailsexecuterequest goes outobservepage, tree or screenshothygiene + detectorfilter what is readagent readsand decides nextvault: passwords never enter this loop; the browser fills them in, on the right host only.A block returns to the agent as a refusal with a reason. A denial by the person does the same.The model's own resistance to injected instructions sits inside 'agent proposes'. This harness does not depend on it.Not drawn: the sandbox from module 8, which holds the whole browser.
One action through the harness. The agent proposes; the harness works out what the action really is; layers decide; the person confirms the irreversible ones.

Every click goes through two steps, and the first is the one that matters. plan_click works out which element receives the click and which request it would send. It does this before anything is allowed to happen.

# from code/mini-browser/browser.py
def plan_click(self, handle: tuple) -> Effect:
    e = self.element_for(handle)
    if e is None:
        return Effect("none")
    words = e.visible_words()
    eff = Effect("none", e, None, e.drawn(), self.covered(e), words)
    c = e.click
    if c is None or c[0] in ("noop",):
        return eff
    if c[0] == "goto":
        h, p, q = parse_url(c[1], self.page.host, self.page.path)
        eff.kind, eff.request = "navigate", Request("GET", h, p, dict(parse_qsl(q)), self.page.host, q)
    elif c[0] == "act":
        eff.kind, eff.request = "post", Request("POST", self.page.host, f"/act/{c[1]}", dict(c[2]), self.page.host)

Read it as: plan_click builds a concrete Effect from what the element actually does, not from any text the agent supplied. The Effect is a request with a real host, path and parameters. execute is only called afterwards, once the layers have looked at that Effect.

Effect, hit test

An Effect is the harness's own description of what a click would do: its kind (navigate, post, submit, dismiss), the request it would send, and whether a person could see and reach the element. A hit test is the step that works out which element a screen position actually lands on, the same way a real browser decides what you clicked. Example: a page that says "completing your order" next to a button whose real Effect is a POST to /act/place_order with a different product id — the layers see the POST, never the sentence.

Why not trust the agent's description ("completing your order")? Because the description comes from the thing you are defending against. A page that can steer the model can steer its account of what it is doing. The request, the host, the parameters and the element's own words are facts about the browser's state that the page cannot rewrite. Part 8 returns to this, where one planted defect shows the confirmation prompt built from the agent's words instead.