Skip to content

Raise the Claude SDK message buffer to 32 MB - #150

Merged
kalil0321 merged 4 commits into
mainfrom
fix/isolate-claude-sessions
Oct 28, 2026
Merged

kalil0321 merged 4 commits into
mainfrom
fix/isolate-claude-sessions

Conversation

@kalil0321

@kalil0321 kalil0321 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Why

A full-page screenshot exceeds the Claude SDK's default 1 MB message buffer, and the run fails with engine_failure and no HAR. (Isolation from the user's own MCP servers, the other half of the original bug, landed on main with #151's build_sdk_settings().)

What

  • SDK_MAX_BUFFER_SIZE (32 MB) in utils.py, passed as max_buffer_size to every ClaudeAgentOptions: auto/agent mode, engineer, collector, folder naming.

Verification

  • pytest: 1208 passed; ruff and mypy clean (uv sync --all-extras --locked).
  • Before main's isolation and this buffer: an auto YC directory capture crashed on a 1 MB screenshot. With both: 50 Playwright calls, 842 KB HAR, status: ok, and engineer on that run status: ok.

Out of scope

  • Nothing else; main's SDK pin (claude-agent-sdk>=0.2.174) already supports max_buffer_size.

RetriggerView in GreptileConfidence Score: 5/5

No identified issues block merging this PR.

Summary

Raises the Claude SDK message buffer to 32 MiB across every session, covering auto/agent mode, engineer, collector, and folder naming. Adds checks for the buffer setting and updates the changelog.

No actionable issues found. Tests were not run during this review.

  • Claude sessions accept messages up to 32 MB.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/fea..." · Reviewed by Greptile

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T20:44:06.536349Z fa01336 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b660687585

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/reverse_api/utils.py Outdated
personal chrome-devtools server) out of rae's sessions, so the agent only sees
the browser and tools rae registers.
"""
return {"strict_mcp_config": True, "max_buffer_size": SDK_MAX_BUFFER_SIZE}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Raise the SDK minimum before passing strict_mcp_config

For installations retaining claude-agent-sdk==0.1.48, which still satisfies the dependency declared in pyproject.toml, every call using this helper raises TypeError: ClaudeAgentOptions.__init__() got an unexpected keyword argument 'strict_mcp_config'. The 0.1.48 options definition has no such field. This prevents Claude auto, engineer, and collector sessions from starting, even though testing against the newer locked SDK succeeds. Raise the declared SDK minimum to a version supporting this option, or pass the isolation flag through the older SDK's supported extra_args mechanism.

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CHANGELOG.md">

<violation number="1" location="CHANGELOG.md:18">
P3: `provider rae configured` is grammatically ambiguous and inconsistent with the changelog’s `RAE` branding. Change it to `the provider configured by RAE`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/reverse_api/utils.py Outdated
Comment thread src/reverse_api/collector.py Outdated
Comment thread CHANGELOG.md Outdated

### Fixed
- Playwright MCP prompt: `browser_run_code` is now `browser_run_code_unsafe`, and the nonexistent `browser_scroll` tool is no longer listed.
- Claude SDK sessions no longer load the user's own Claude Code MCP servers (`strict_mcp_config`), so a personal browser MCP such as chrome-devtools can no longer replace the provider rae configured, and the message buffer is raised to 32 MB so a large screenshot no longer aborts a run.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: provider rae configured is grammatically ambiguous and inconsistent with the changelog’s RAE branding. Change it to the provider configured by RAE.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At CHANGELOG.md, line 18:

<comment>`provider rae configured` is grammatically ambiguous and inconsistent with the changelog’s `RAE` branding. Change it to `the provider configured by RAE`.</comment>

<file context>
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Fixed
 - Playwright MCP prompt: `browser_run_code` is now `browser_run_code_unsafe`, and the nonexistent `browser_scroll` tool is no longer listed.
+- Claude SDK sessions no longer load the user's own Claude Code MCP servers (`strict_mcp_config`), so a personal browser MCP such as chrome-devtools can no longer replace the provider rae configured, and the message buffer is raised to 32 MB so a large screenshot no longer aborts a run.
 
 ### Security
</file context>
Suggested change
- Claude SDK sessions no longer load the user's own Claude Code MCP servers (`strict_mcp_config`), so a personal browser MCP such as chrome-devtools can no longer replace the provider rae configured, and the message buffer is raised to 32 MB so a large screenshot no longer aborts a run.
- Claude SDK sessions no longer load the user's own Claude Code MCP servers (`strict_mcp_config`), so a personal browser MCP such as chrome-devtools can no longer replace the provider configured by RAE, and the message buffer is raised to 32 MB so a large screenshot no longer aborts a run.

@kalil0321 kalil0321 changed the title Isolate Claude SDK sessions from the user's MCP servers and raise the message buffer Raise the Claude SDK message buffer to 32 MB Oct 28, 2026
@kalil0321
kalil0321 deleted the branch feat/chrome-mcp-default October 28, 2026 22:02
@kalil0321 kalil0321 closed this Oct 28, 2026
@kalil0321 kalil0321 reopened this Oct 28, 2026
@kalil0321
kalil0321 changed the base branch from feat/chrome-mcp-default to main October 28, 2026 22:03
@kalil0321
kalil0321 merged commit 6d6851e into main Oct 28, 2026
28 checks passed

This branch was successfully deployed

1 active deployment
preview — fa013363 Deployed Oct 28, 2026 by github-actions[bot]
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