Add agentic workflow enhancements: timeout, timing, truncation, enriched info#2
Open
Add agentic workflow enhancements: timeout, timing, truncation, enriched info#2
Conversation
… and configurable stackframes Five agentic workflow enhancements to the eval and info tools: 1. Eval timeout with worker kill: optional `timeout` parameter races eval against a timer; on timeout, kills the worker and returns TimeoutError 2. Execution timing: every eval returns elapsed time (e.g., [45.2ms]) 3. Output truncation: `max_output` parameter (default 50K chars) prevents context window overflow with head+tail preservation 4. Enriched info: variables now include type and size (e.g., x::Int64, df::DataFrame (1000, 5)) — no extra eval calls needed 5. Configurable stacktrace depth: `max_stackframes` parameter on eval Zero new dependencies, no new MCP tools. All 103 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
Code reviewFound 7 issues:
AgentREPL.jl/src/formatting.jl Lines 15 to 19 in 4b5d7f0
Lines 134 to 153 in 4b5d7f0
Lines 191 to 197 in 4b5d7f0
Lines 74 to 83 in 4b5d7f0
Line 78 in 4b5d7f0
AgentREPL.jl/claude-plugin/.mcp.json Line 12 in 4b5d7f0
AgentREPL.jl/test/test_eval.jl Lines 85 to 95 in 4b5d7f0 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…e_tool removal, docs - Fix Unicode crash in truncate_output by using first()/last() instead of byte indexing - Fix channel race condition in timeout by increasing Channel capacity to 2 - Fix misleading length=1 for scalars in info tool by guarding on !isempty(size()) - Remove deprecated mode_tool registration from server - Fix JULIA_REPL_PROJECT empty string crash in entry point - Update CLAUDE.md: key functions, tool count, and WORKER docstring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update marketplace.json versions from 0.3.0 to 0.5.0 to match plugin.json and Project.toml. Fix HIGHLIGHT_CONFIG being cached at precompile time by moving env var reads into __init__(), ensuring JULIA_REPL_OUTPUT_FORMAT and JULIA_REPL_HIGHLIGHT are read at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirror the styling from logging.jl into format_result: bold green julia> prompt, dim timing, bold red errors with dim stacktraces, dim → prefix when both stdout and return value exist, and styled truncation markers. All conditional on highlighting enabled + ANSI format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Close the result channel after take! so the losing async task (timer or eval) gets an InvalidStateException on put! and exits promptly instead of leaking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
timeoutparameter kills the worker on hung/infinite code (e.g.,eval(code="while true end", timeout=5))[45.2ms]or[1.23s])max_outputparameter (default 50K chars) prevents context window overflow, preserving head (60%) + tail (40%)infotool now shows variable types and sizes (e.g.,x::Int64,df::DataFrame (1000, 5)) instead of just namesmax_stackframesparameter on eval controls error trace depth (default 5)Zero new dependencies, no new MCP tools — all features extend existing
evalandinfotools. Plugin docs updated.Test plan
julia --project=. -e "using Pkg; Pkg.test()")eval(code="1+1")shows timing,eval(code="sleep(5)", timeout=1)times out,infoshows typed variables🤖 Generated with Claude Code