You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lifecycle object on every response adds ~10k tokens per session over MCP
#2319
It shows up on wait_ms, get_url, click, and so on, where nothing about the launch changed. For an agent it matters once per session, or when something actually happened (a launch, a relaunch, a restore). The rest of the time it is noise in the model's context.
Measured: over one Claude Code session with 96 agent-browser MCP calls on 0.39.0, the lifecycle blocks added about 36k characters (~10k tokens) of output. That figure counts both copies of the payload; #2092 removes the duplicate copy, which halves it but doesn't remove it. A click or wait_ms result is roughly 550 to 750 characters, and most of that is lifecycle.
Suggested fix (either):
Include lifecycle only when something in it is not the steady state (launched, relaunchedBrowser, restartedBackground true, or a restore/save status worth reporting).
Or keep it in --json CLI output but drop it from MCP structuredContent unless it carries news.
The object is added in cli/src/main.rs (mark_restarted_background) and cli/src/native/actions.rs. Since it is part of the --json contract, I'm filing this as an issue rather than a PR so you can pick the shape.
This discussion was converted from issue #2094 on November 03, 2026 06:48.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Every successful command response carries a
lifecycleobject, including in MCP tool results:It shows up on
wait_ms,get_url,click, and so on, where nothing about the launch changed. For an agent it matters once per session, or when something actually happened (a launch, a relaunch, a restore). The rest of the time it is noise in the model's context.Measured: over one Claude Code session with 96 agent-browser MCP calls on 0.39.0, the
lifecycleblocks added about 36k characters (~10k tokens) of output. That figure counts both copies of the payload; #2092 removes the duplicate copy, which halves it but doesn't remove it. Aclickorwait_msresult is roughly 550 to 750 characters, and most of that islifecycle.Suggested fix (either):
lifecycleonly when something in it is not the steady state (launched,relaunchedBrowser,restartedBackgroundtrue, or a restore/save status worth reporting).--jsonCLI output but drop it from MCPstructuredContentunless it carries news.The object is added in
cli/src/main.rs(mark_restarted_background) andcli/src/native/actions.rs. Since it is part of the--jsoncontract, I'm filing this as an issue rather than a PR so you can pick the shape.All reactions