Skip to content

client tools: a set may carry 8192 instruction bytes, and a refusal names the size it saw - #2729

Merged
santoshkumarradha merged 3 commits into
santosh/workfrom
fx1/tool-set-cap
Nov 17, 2026
Merged

santoshkumarradha merged 3 commits into
santosh/workfrom
fx1/tool-set-cap

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Fixes E2 F1 (engine half). The desk's Personal Afi set carries WorkstreamWorkRules (3125 bytes) verbatim plus its own lines and came to 4521 bytes, over ClientToolInstructionsMax = 4096. agents.tools_set refused it with bad_params and Afi had no ws_* tools.

  • session.ClientToolInstructionsMax 4096 → 8192, with the reason on the constant. Four sets at the cap add at most 32 KiB to a turn.
  • TestWorkstreamRulesLeaveRoomInAClientToolSet: the rules may take at most half the cap.
  • The refusal names the one limit crossed and the size sent (ClientToolSetSizeError, used by both the wire validator and the conversation door).
  • Manual client-tools.md and a change entry updated.

Desk half (test that the declared sets fit + loud warning): companion PR in codeaf-desk.

🤖 Generated with Claude Code

santoshkumarradha and others added 3 commits November 17, 2026 07:53
…ames the size it saw

The desk's Personal Afi set carries WorkstreamWorkRules (3125 bytes) plus its
own lines and came to 4521 bytes, over the 4096 cap, so agents.tools_set refused
it and Afi had no ws_* tools. Raise the cap to 8192, hold the rules to at most
half of it with a test, and make the refusal name the one limit crossed and the
size sent.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit 1788fcb into santosh/work Nov 17, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the fx1/tool-set-cap branch November 17, 2026 13:05
ZeroPoint95 pushed a commit that referenced this pull request Nov 24, 2026
…ames the size it saw (#2729)

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
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