Repository navigation
Conversation
…ecomes a zero-token program Live agent loop with selective vision (structural listing first, screenshots on request or at the save gate), right-record check and hold before every save, run-1 record check against the system of record, person-confirmed record checks, JIT admission (policy self-admission), emitted skill, MCP server and CLI line, and replays with a verify-run receipt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, CI - Gate a click at the current pointer (no coordinate) like any other click. - docs/CRYSTALLIZE.md; CAPABILITIES.md and JIT.md point at it. - benchmark/crystallize/measure.py: live selective vs every-turn runs. - Run tests/e2e/test_crystallize_e2e.py in the flow-critical CI job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ten live claude-opus-5-5 trials per arm on MockMed: structure first used 10,332 prompt tokens and $0.028 per run against 76,053 and $0.148 with a screenshot every turn; 10/10 passed in each arm; 10/10 replays VERIFIED with 0 model calls. A new run 1 clears checks confirmed for an earlier draft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s.json Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gaps from review Rename: openadapt-flow compile-agent / compile-agent run, package openadapt_flow.compile_agent (compile_first_run, run_compiled, FirstRunCompiler), COMPILE_AGENT.md, benchmark/compile_agent, cache dir .openadapt-compile-agent. The help says the agent writes to --url. Review fixes: - Gate every action that may commit: commit-labelled controls of any role, unreadable elements, Enter, typed line breaks, Space off text fields, shortcuts. More commit words (delete, update, done, ...). - Identity must appear as whole words in the control's row, dialog, form or section, not anywhere on the page; refs are re-checked by row. - A refused run's draft is set aside even if the agent carried on; stale proposals are cleared; run 1 refuses on a task with a draft or program. - The recording is signed with the driving agent's principal, not the admitter. - Person admission shows steps and canary results and asks at each stage. - Canary values are required (a canary is a real save); no defaults. - Unknown models need explicit prices for the cost cap. - confirm_params runs before verify.yaml is written; receipt baseline is reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--backend (record's choices), a --config whose backend.kind is not web, or a non-http(s) URL stop with exit 2 and a message before anything runs. The Python API raises UnsupportedTarget. No silent browser fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
added a commit
that referenced
this pull request
Oct 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e not saves
- A click over an iframe is read inside the frame through the backend's
hit-tested frame chain; a frame it can't map counts as unreadable (gated).
- Enter or Space with focus inside a frame reads the frame that has focus.
- A click on an editable field ("Postal code") only focuses it; not a commit.
Found by the code-as-action session (claude/code-as-action d3b8efc4, 8bbcad02);
ported here so #1277 does not merge with the gaps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openadapt-flow compile-agent "<task>"compiles an agent's first verified run: a computer-use agent does the task once against--url(it writes there, so point it at a test copy), OpenAdapt checks the record it wrote in the system of record, and compiles the run into a program. Later runs make no model calls.openadapt-flow compile-agent run <dir>runs it.What it does
openadapt_flow/compile_agent/harness.py). Claude (claude-opus-5-5, the customer's own key) gets the page's structure as short text lines with element refs, not a screenshot every turn. It can ask for a screenshot, and gets one after a save. Every action goes through the JITCaptureComputer, so the run is recorded and compiled like any JIT capture.--on-screen "MRN P1") must appear as whole words in the control's own row, dialog, form or section. The harness keeps a screenshot as evidence and asks the hold when there is one. A save on the wrong record is never performed, and nothing is compiled.--expectfield, and every input landed in it.record --verifyproposals. A person confirms them (and the parameters); they become the program'sverify.yaml.run_compiled.Python API (
openadapt_flow.compile_agent):compile_first_run(...),run_compiled(dir, **params), andFirstRunCompilerfor the steps one at a time.ClaudeAgent(vision="selective" | "every_turn"),ScriptedAgentfor no-model runs. Docs:packages/flow/docs/COMPILE_AGENT.md.Measured (
packages/flow/benchmark/compile_agent/)Ten live trials per arm on MockMed, alternating order, a distinct note per trial, prompt caching on in both arms. Raw rows are committed. (Measured at 2d5e4c1, before the rename.)
Wall time mostly tracked the shared host's load (1-minute load average 60 to 480 during the run). At low load (trials 1 to 3), run 1 took 15 to 18 s structure first and 36 to 59 s every turn. Ten replays of the admitted programs: 10/10 VERIFIED, 0 model calls. Total spend under $2.30 of the $20 cap.
Tests
tests/test_compile_agent.py(no browser): record check, commit labels, listing, scrubbing that keeps the task's own values, the Claude loop's token accounting, cost cap and refusal, every gated way to commit and the plain actions that are not, whole-word scoped identity, stale refs by row, the hold, the emitted MCP server.tests/e2e/test_compile_agent_e2e.py(MockMed, no network): the realClaudeAgentloop with a fake client compiles run 1, the registered agent self-admits under its policy after two canaries, the replay makes 0 model calls with a VERIFIED receipt, compiling again does not call the agent and run 1 refuses to run on an admitted task, a replay on an app that files the note on another patient halts, an agent that opens the wrong patient is refused at the save with nothing written or compiled, and the CLI path (no terminal stops at draft, a person confirms at a terminal, an admitter key admits,compile-agent run). Added to theflow-criticalCI job, which is the job that runstests/e2efiles.Other changes
CaptureComputergainspage,pointerandscreenshot()(read-only).docs/JIT.md: the live-loop sketch now points at the shipped loop.docs/CAPABILITIES.md(flow): a "From a prompt to a program" section. The rootCAPABILITIES.mddoes not exist onmainyet; docs: one map of what OpenAdapt can do #1260 adds it (with a test that every verb is listed);compile-agentgoes into its command list once it is onmain.Web only, and says so
compile-agent runs web apps only in this PR.
--backend windows|macos|linux|rdp|citrix, a--configwhosebackend.kindis notweb, or a non-http(s) URL is refused with exit 2 before anything runs (UnsupportedTargetin Python). There is no silent browser fallback. Desktop, RDP and Citrix need the JIT to drive therecord --backendbackends and a non-DOM observer; that is left for the backend-parity work.Limits
Listed in COMPILE_AGENT.md: web apps only; the gate recognizes commits by label and Enter in a form; on a wrong-record replay the verify-run receipt says
HALTED_BEFORE_EFFECTrather thanRECONCILIATION_REQUIREDuntil the guarded save (#1258) lands; canaries write test records; MockMed's demo idempotency key needs a reset between runs in tests.Review
An independent full-diff review found gaps in the save gate (newline, Space, shortcuts, role=button, unreadable elements, whole-page substring identity), person admission filing the review for the person, the admitter stamped as recorder, and default canary values. All are fixed in 98a3223 with tests; the remaining items are listed as limits.
🤖 Generated with Claude Code