Repository navigation
Conversation
openadapt-agent serve --teach VERIFY_YAML adds teach_start, teach_observe, teach_act, teach_screen, teach_finish, teach_abort, teach_status, teach_confirm_checks and teach_admit. The connected agent is the inner agent of compile-agent's FirstRunCompiler (compile_agent.driven.DrivenRun): run 1 goes through the same harness and save gate, the record check reads the system of record, a person confirms the proposed check in the client's form, and teach_admit admits only as the registered agent the operator configured, under a person-signed policy (self-admission needs allow_self_admission). An admitted program joins list_workflows and run_workflow and gets a taught_<name> tool; the server sends tools/list_changed. FirstRunCompiler takes surface= (a deployment backend section) and uses a new SurfaceHarness off the web: same gating, and a person approves every gated action because the harness can't read which record a form shows. openadapt-flow compile-agent admit TASK_DIR is the person's terminal path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…9950e' into claude/mcp-teach-compile-a652e8
…the web Review fixes for the MCP teach tools: - An approval covers one run, one exact action and the app as it was (run id, action, actions performed so far). A changed screen, another run or another action in between refuses it; nothing is done. - Off the web, every click is gated unless it is on a ref'd text field, check box, tab or a plainly navigating control; clicks at x,y, Enter, typing outside a text field, single-letter keys and shortcuts are gated. Focus resets after Tab and other focus keys, so Space after Tab is gated. The gate uses the ref's control, not a coordinate match. - On the web, typing a space on a focused button is gated. - type with a ref refuses a ref that isn't a text field. - An action that times out ends run 1 instead of running later. - A run that fails to start stays tracked until its thread ends. - One app lock for run 1, canaries and taught runs. - The server stops an unfinished run 1 on exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Base automatically changed from
claude/crystallize-from-prompt-89950e
to
main
October 19, 2026 16:49
Keeps main's page-less CommitHint gating in the web harness next to the teach path's ref-aware commit_target. The teach unit tests no longer import the MCP SDK at collection (test_emit checks emission doesn't import it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… into claude/mcp-teach-compile-a652e8
Keeps both sides: the task ledger's tools and the teach tools in the MCP server (a taught workflow's own tool goes through the ledger like run_workflow), _attach_ledger on teach servers, both README sections (teach, then the ledger), both .gitleaksignore fingerprint sets, and the split command map with a compile-agent admit note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
added a commit
that referenced
this pull request
Oct 19, 2026
#1335's files (agent/cli.py, agent/mcp.py, .gitleaksignore, the agent README) taken from its updated branch, which already merged this main; the guard section added back to the README. The guard command moved to docs/commands/11-guard-an-agent-you-already-run by scripts/migrate_branch_to_split_files.py, which also regenerated the command list, the verification docs and the path-only artifact inventory. llms-full.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
added a commit
that referenced
this pull request
Oct 19, 2026
Takes #1335's harness docstring and its MCP teach tests (which no longer load mcp at collection); keeps the guard's CI tests, README section and capability rows. llms-full.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
An agent connected over MCP can now turn a task it can't do yet into a workflow it calls, without leaving the conversation. It does the task once through OpenAdapt; the run is read back, compiled and admitted; and the result is a new tool that runs with no model calls.
Stacked on #1277 (compile-agent). Its base is that branch; merge #1277 first, then this retargets to
main.How it works
openadapt-agent serve --teach verify.yaml --url <test app>(or--config deploy.yamlfor a native or remote app) adds:teach_startteach_observe,teach_act,teach_screenteach_finishteach_confirm_checksteach_admittaught_<name>list_workflows/run_workflow.The connected agent is the inner agent of
FirstRunCompiler:compile_agent/driven.pyrunsrecord()on its own thread and feeds it one action per tool call. Nothing in the record check, the proposed checks, the canaries or the emit step is new code.Admission stays inside JIT_ADMISSION.md
--teach-key,--teach-policy). An admitter key is refused: on a server the agent drives, it would let the agent approve its own draft.teach_admitis self-admission. Lifecycle refuses it unless the policy setsallow_self_admission, before any canary runs.teach_admitreturns the terminal command:openadapt-flow compile-agent admit TASK_DIR --admit-as NAME(new).notifications/tools/list_changed(it now advertisestools.listChanged). A server started later lists every taught program.Every backend
FirstRunCompiler(surface=<deployment backend section>)uses a newSurfaceHarnessoff the web. It gates the same actions, but it can't read which record a native or remote form shows, so a person approves every gated action in the client's form; a client without forms can't save. The approval is bound to the control the person was shown. Native backends list no controls yet (BACKEND_PARITY gap), so the agent reads the screen (--teach-screens scrubbed, fails closed) and clicks pixels. On RDP and Citrix, admission is refused with the gate's reason (pixel identity is not armed yet). Network RDP is refused at start.Tests (synthetic data, no model calls)
tests/e2e/test_mcp_teach_e2e.py(added to the flow-critical job, which now installs theagentextra): a scripted MCP SDK client on MockMed. Full loop: record, read back, person confirms, agent self-admits under policy,tools/list_changed, the new tool runsdonewith 0 model calls. Refusals: admit before the check is confirmed; no policy; recording agent withoutallow_self_admission(no canary runs); a save on the wrong record fails the read-back; the agent can't confirm the check without a person. Also a person admitting at a terminal.tests/test_mcp_teach_surfaces.py: teach over MCP through the realRemoteDisplayBackendandCitrixWorkspaceBackend(kiosk window, pixels only); every click approved by a person; canary refused with its reason.tests/test_compile_agent_surface_harness.py,tests/test_mcp_teach_cli.py: unit tests for the surface harness and the server flags.Local: those files pass; agent shim tests (mcp_server, cli, authoring, readme commands, bridge) pass; ruff, ruff format, mypy clean. The host's load average was 60-270 during runs, and one browser test flaked once while starting the app; CI is the real check.
Review fixes (independent review, commit 328e4fb)
click at x=..,press Enter).servestops it on exit.Documented, not changed: on the web without
--teach-hold, the agent names the identity the gate checks; the run-1 record check and the person who confirms it are what catch a weak one.Docs
packages/agent/README.md(Teach a new workflow from your agent, linked from Connect your own agent),packages/agent/docs/DESIGN.md,packages/flow/docs/COMPILE_AGENT.md,packages/flow/docs/BACKEND_PARITY.md, andCAPABILITIES.md(summary, agents table, and the command list).🤖 Generated with Claude Code