Skip to content

Bot harnesses take no orders from a run's extra forwarded props - #2073

Merged
davidmckayv merged 2 commits into
mainfrom
fix/harness-forwarded-props-allowlist
Nov 23, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
fix/harness-forwarded-props-allowlist

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Four Bot harnesses no longer pass a run's forwarded props on to their framework: Claude Agent SDK, LangGraph (Python), ADK and Strands. Each reads the props it uses first, then hands the framework none.

Why

The server passes a run's forwardedProps on to the Bot as the browser sent them, less its own openbot* keys. Some frameworks read the rest as orders.

Claude Agent SDK (ag-ui-claude-sdk 0.1.5). Its own allowlist already drops mcp_servers, allowed_tools, permission_mode, cwd, hooks, tools, env and system_prompt, so a browser could not add an MCP server or loosen permissions. But the keys on its list reached Claude Code's command line on a full Bot:

  • resume, fork_session, resume_session_at: load another saved conversation in the container
  • model, fallback_model: a model the organization never allowed (fallback_model even when the server chose the model)
  • betas, max_turns, max_budget_usd, output_format, include_partial_messages, enable_file_checkpointing, strict_mcp_config

Measured on the real harness under uvicorn with a real AG-UI run. Before this change, Claude Code was started with --resume=another-persons-thread-id --fork-session --resume-session-at=msg-123 --model ... --fallback-model ... --betas ... --max-turns 1 --max-budget-usd 0.01 --json-schema .... After it, none of those flags appear, and --mcp-config holds only ag_ui. The model endpoint (/model) already dropped them.

LangGraph (ag-ui-langgraph 0.0.45). nodeName / node_name started the graph past the model. A thread ending in a call the Bot made earlier had that call run with the arguments it carried, and the model was never asked. command.resume resumed the graph with no conversation.

ADK (ag-ui-adk) and Strands (ag-ui-strands). injectA2UITool added a generate_a2ui tool that calls the model again. Given a tool's name, it also took that granted tool away from the run.

The other harnesses (agno, antigravity, microsoft, ag2, pydantic-ai, llamaindex, langroid, crewai, langgraph-ts, mastra) were checked against their installed framework versions. Nothing they read from these props takes effect today.

Tests

Each harness gets tests/test_forwarded_props_stay_out.py. Each test fails on main and passes with the fix:

  • Claude SDK: sends every prop above and checks the Claude Code command line the SDK builds. The model endpoint passed both before and after.
  • LangGraph: through the production endpoint and the controlled model and callback server, a run with nodeName, node_name or command.resume goes exactly as the same run without them. On main, the call left in the thread ran with "chosen by the sender" arguments and one model call fewer.
  • ADK and Strands: through the production endpoint and the shared fake provider, the model is offered the same tools with injectA2UITool as without it. On main, generate_a2ui was added, or replaced the granted tool.

Full suites, run locally: Claude SDK 160 passed, ADK 35, Strands 22. LangGraph: 192 passed, and the 2 Docker-only provider tests could not run here, with no Docker on this machine.

The server passes a run's forwarded props on to the Bot as the browser sent them, less its own
openbot keys. ag-ui-claude-sdk applies a list of them to Claude Code: resume and fork_session
(load another saved conversation), model and fallback_model (a model the organization never
allowed), betas, max_turns, max_budget_usd, output_format and the rest. The model endpoint already
dropped them; a full Bot now does too. The server's own openbotModel still decides the model.
…reach the framework

The server passes a run's forwarded props on as the browser sent them, less its own openbot keys,
and three more frameworks obeyed some of the rest. ag-ui-langgraph took nodeName and command:
nodeName started the graph past the model, so a call left in the thread ran with the arguments it
carried, and command.resume resumed the graph with no conversation. ag_ui_adk and ag_ui_strands
took injectA2UITool, which added a generate_a2ui tool and, given a tool's name, took that granted
tool away. Each harness now passes no forwarded props on; the ones it uses are read before that.
@davidmckayv davidmckayv changed the title Claude SDK Bot: options a run's sender adds never reach Claude Code Bot harnesses take no orders from a run's extra forwarded props Nov 23, 2026
@davidmckayv
davidmckayv merged commit 6d9c4d0 into main Nov 23, 2026
33 checks passed
@davidmckayv
davidmckayv deleted the fix/harness-forwarded-props-allowlist branch November 23, 2026 20:05
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