Repository navigation
feat: REPL tool POC (Code Mode spike) - #436
Merged
Merged
Conversation
Code-orchestrated tool calls per docs/research/code-mode-design.md: - REPLTool executes a JavaScript snippet making several tool calls (shell via $, files via read/write/edit, search via glob/grep); only the last expression returns to context - Implicit-return transform: final expression is returned even when the snippet ends with a semicolon; SyntaxError falls back to raw body - Wired in getAllBaseTools + post-MLX-tier-filter injection (tier spec table frozen — REPL bypasses tiering); gated on REPL mode or BENCH_CODE_MODE=1, default-off otherwise - lazy require(): REPLTool→Tool.js→AgentTool TDZ import loop - Validated on Qwen3.8-27B-4bit-mtp: scripted count task resolved in 2 REPL calls with correct result; read+edit flow also green Co-Authored-By: Claude Code <[email protected]>
This was referenced Dec 1, 2026
Merged
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.
Summary
$shell, read/write/edit, glob/grep); only the last expression returns to model contextBENCH_CODE_MODE=1— default-off, byte-identical when disabledValidation
Design: docs/research/code-mode-design.md (#433)
🤖 Generated with Claude Code