[Bug]: Your tool itself offsets token saved by it because of things like this.
Platform
Codex CLI
context-mode version
all versions
Debug script output (REQUIRED)
it's design issue.Exact prompt that triggered the bug (REQUIRED)
ctx_batch_execute
ctx_execute_fileFull error output (REQUIRED)
it's not error, it's how it's designed.Steps to reproduce (REQUIRED)
Context-mode tool calls are rendered verbosely in Codex chat: ctx_execute_file exposes full paths and inline code, while ctx_batch_execute repeats serialized commands, labels, queries, index metadata, and result sections. This consumes UI space and likely context tokens, offsetting the benefit of keeping source output sandboxed. Is there a quiet/hide_tool_arguments option, a compact renderer, or a recommended low-overhead query API for routine file analysis?
What have you tried to fix it?
I set this rule in AGENTS.md but not that effective:
Tool calls are user-visible and have no quiet mode. Prefer ctx_search for indexed or session facts; do not use ctx_batch_execute for routine reads, and use ctx_exec ute or ctx_execute_file only when sandboxed processing is necessary and its inline program is short. Never bundle unrelated files, commands, or broad queries; a tool ca
rd must be no larger than the decision it enables.
Pre-submission checklist
- I have run the debug script and pasted the output above
- I am using the latest version of context-mode
- I have searched existing issues for duplicates
- I have included steps to reproduce the issue
Operating System
Windows (PowerShell)
JS Runtime
No response
Source: mksglu/context-mode