fix(tools): activate read-only git history + actionable RLM/field errors (v0.8.53)#2685
Conversation
v0.8.53 tool/deferred/error UX (PR group 4), low-risk subset: - #2654: add git_log and git_show to DEFAULT_ACTIVE_NATIVE_TOOLS so read-only git history joins git_diff/git_status in the active partition (kept alphabetical → prefix-cache head stays sorted/byte-stable). git_blame and other history tools remain deferred. - #2655: rlm_open's source-count error now echoes common misnamed fields with a "did you mean file_path/content/url" hint; rlm_eval's missing-`code` error explains it runs raw Python and shows an example. Schema descriptions for rlm_eval name/code sharpened. - #2659: likely_field_corrections gains RLM source-field rename hints (the role/type vocabulary change itself lives in the WS3 PR #2684 to avoid a double-edit of normalize_role_alias). Deferred to the medium-risk batch: #2648 (render deferred-tool hydration distinctly from "done") — needs a ToolStatus/cell-build change with wider render blast radius than this low-risk PR. Verification: cargo test -p codewhale-tui --bins → 3944 passed, 0 failed (incl. prefix-cache sort invariant); cargo clippy clean. Targets codex/v0.8.53.
There was a problem hiding this comment.
Hmbown has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Code Review
This pull request activates git_log and git_show by default in non-Yolo mode, updates related tests, and improves error messaging and field correction suggestions for the rlm_open and rlm_eval tools. The review feedback suggests enhancing the rlm_open error messages and correction logic to properly account for session_object as a valid source field, preventing false-positive suggestions and ensuring complete documentation of valid inputs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if tool_name == "rlm_open" { | ||
| for wrong in ["prompt", "resident_file", "text", "body", "path", "file", "source"] { | ||
| if has_received(wrong) && !has_received("file_path") && !has_received("content") | ||
| && !has_received("url") | ||
| { | ||
| corrections.push(format!("{wrong} -> file_path (local file), content (inline text), or url")); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
The likely_field_corrections logic for rlm_open checks that none of file_path, content, or url have been received before suggesting corrections. However, session_object is also a valid source field for rlm_open. If a user provides session_object along with an unrecognized/misnamed field (e.g., prompt), this check will incorrectly trigger and suggest correcting the unrecognized field to file_path, content, or url even though a valid source field is already present.
Adding a check for !has_received("session_object") prevents these false-positive suggestions.
if tool_name == "rlm_open" {
for wrong in ["prompt", "resident_file", "text", "body", "path", "file", "source"] {
if has_received(wrong)
&& !has_received("file_path")
&& !has_received("content")
&& !has_received("url")
&& !has_received("session_object")
{
corrections.push(format!(
"{wrong} -> file_path (local file), content (inline text), url, or session_object"
));
}
}
}| let mut msg = String::from( | ||
| "rlm_open: provide exactly one of `file_path` (local file), `content` (inline text), or `url`", | ||
| ); |
There was a problem hiding this comment.
The error message for rlm_open when source_count != 1 lists file_path, content, and url as the valid options, but omits session_object, which is also a valid source field. To prevent confusion when a user provides session_object along with another source field (or none at all), session_object should be explicitly listed in the primary error message.
| let mut msg = String::from( | |
| "rlm_open: provide exactly one of `file_path` (local file), `content` (inline text), or `url`", | |
| ); | |
| let mut msg = String::from( | |
| "rlm_open: provide exactly one of `file_path` (local file), `content` (inline text), `url`, or `session_object`", | |
| ); |
Part of the v0.8.53 stabilization cycle (PR group 4 — tool/deferred/error UX). Targets
codex/v0.8.53. Low-risk subset; one medium-risk item deferred (see below).Issues addressed
git_logandgit_showjoingit_diff/git_statusinDEFAULT_ACTIVE_NATIVE_TOOLS, so a model can inspect history without a deferred-tool round-trip. Insertions keep the list alphabetical, so the prefix-cache catalog head stays sorted and byte-stable.git_blameand other history tools stay deferred (no broad un-defer).rlm_opensource-count error echoes common misnamed fields (prompt,text,path,file, …) with a "did you meanfile_path/content/url" hint.rlm_evalmissing-codeerror explains it runs raw Python and shows an example (print(len(SOURCE)),FINAL(value));name/codeschema descriptions sharpened.likely_field_correctionsgains RLM source-field rename hints. (The role/type vocabulary reconciliation itself is in PR fix(subagent): clearer role vocab, lifecycle signals, and eval ergonomics (v0.8.53) #2684 to avoid a double-edit ofnormalize_role_alias; this PR only touches the corrections table, so the two do not collide.)Deferred to the medium-risk batch
metadata.event = tool.schema_hydrated,executed: false), but the renderer change touches theToolStatus/cell-build path with wider blast radius than this low-risk PR warrants. Tracked for the next batch.Scope / deconfliction
DEFAULT_ACTIVE_NATIVE_TOOLSedits are in thegit_*region — non-overlapping with PR fix(subagent): clearer role vocab, lifecycle signals, and eval ergonomics (v0.8.53) #2684'sagent_*additions, so both auto-merge.Verification
cargo test -p codewhale-tui --bins→ 3944 passed, 0 failed, includingmodel_tool_catalog_sorts_each_partition_for_prefix_cache_stabilityand the native-deferral policy tests (updated to usegit_blameas the still-deferred example).cargo clippy -p codewhale-tui --bins→ clean.rlm_open_misnamed_source_field_gets_did_you_mean_hint,rlm_eval_missing_code_explains_raw_python, andgit_log/git_showactive assertions.🤖 Generated with Claude Code