Releases: kardolus/chatgpt-cli
ChatGPT CLI v1.10.11
New Features
- Configurable HTTP client timeout (
http_timeout)- Added a new configuration option to control the HTTP client timeout (in seconds), allowing better support for slow or local models and environments with variable latency.
- Supports setting the timeout to
0for no timeout. - Code references:
config/config.go(newHTTPTimeoutfield)cmd/chatgpt/main.go(new config wiring andset-http-timeoutsupport)api/http/http.go(HTTP client now uses configured timeout)README.md(documented new setting)
Improvements
-
HTTP client behavior is now configurable rather than fixed
- Replaces the previously hardcoded timeout with a value driven by user configuration, improving flexibility across different runtime environments.
- Code reference:
api/http/http.go
-
Expanded test coverage for HTTP configuration
- Added tests to verify timeout behavior (configured timeout and default behavior).
- Code reference:
api/http/http_test.go
Bug Fixes
- No user-facing bug fixes identified beyond the shift from a hardcoded HTTP timeout to a configurable value.
Other Changes
- Documentation update
- Added
http_timeoutto the configuration/environment variable documentation table. - Code reference:
README.md
- Added
Upgrade Notes
- Homebrew (recommended):
- Run:
brew upgrade chatgpt-cli
- Run:
- Direct download:
- Download the prebuilt binaries for your specific OS from the project’s release artifacts and replace your existing
chatgptexecutable.
- Download the prebuilt binaries for your specific OS from the project’s release artifacts and replace your existing
ChatGPT CLI v1.10.10
This release focuses on safer persistence and file permissions, more reliable config writes, and bounded agent transcript/prompt logging to prevent unbounded memory/log growth while improving debuggability.
New Features
-
Capped in-memory transcript and prompt history (with truncation banner)
- Introduced a new
TranscriptBufferutility to store agent transcripts and prompt history with a strict maximum size and a visible…(truncated)banner when older content is dropped. - Integrated into
BaseAgentasTranscriptandPromptHistory, enabled by default with conservative limits and configurable via:core.WithTranscriptMaxBytes(n)core.WithPromptHistoryMaxBytes(n)
- Code references:
agent/core/transcript_buffer.go(new)agent/core/base_agent.go
- Introduced a new
-
Cross-platform config write locking
- Added an OS-specific file lock implementation to prevent concurrent config writes from corrupting the config file.
- Code references:
config/file_lock_unix.go(new)config/file_lock_windows.go(new)config/store.go
-
Secure API key file reader
- Centralized API key file loading with validation:
- must be a regular file
- must not be empty
- size capped at 10KB
- path is cleaned
- Code references:
config/read_api_key_file.go(new)cmd/chatgpt/main.go
- Centralized API key file loading with validation:
Improvements
-
Agent runs now capture structured transcripts for easier debugging
- Both Plan-and-Execute and ReAct agents now:
- reset transcript/history at the start of each run
- record key lifecycle events (goal, plan steps, prompts, raw LLM output, actions, outcomes, final result)
- This provides consistent, machine-readable traces while keeping memory usage bounded.
- Code references:
agent/planexec/plan_execute_agent.goagent/react/react_agent.go
- Both Plan-and-Execute and ReAct agents now:
-
HTTP client now uses a default timeout
- Adds a 60-second timeout to avoid indefinite hangs on network calls.
- Maintains SkipTLSVerify support while reusing a cloned default transport.
- Code reference:
api/http/http.go
-
Safer “workdir escape” detection
- Workdir and resolved target paths now evaluate symlinks before containment checks, improving correctness when symlinks are involved.
- Code reference:
agent/core/policy.go
Bug Fixes
-
Prevent transcript/prompt history accumulation across agent runs
- Agents explicitly reset buffers at the start of
RunAgentGoal, eliminating “leftover” content leaking into subsequent runs. - Tests added to prevent regressions.
- Code references:
agent/planexec/plan_execute_agent.go,agent/planexec/plan_execute_agent_test.goagent/react/react_agent.go,agent/react/react_agent_test.go
- Agents explicitly reset buffers at the start of
-
Hardened config persistence to reduce risk of partial/corrupted writes
- Config writes are now:
- protected by a lock
- written via an atomic temp-file + rename strategy
- synced to disk (best-effort)
- permissions preserved when possible
- Code reference:
config/store.go
- Config writes are now:
Other Changes
-
Tighter default filesystem permissions for sensitive data
- Log dir permissions:
0700(was0755)agent/core/log.go
- Config file writes:
0600(was0644)cmd/chatgpt/main.go(config save)config/store.go(atomic write defaults/preserve)
- CLI interactive history file:
0600(was0644)cmd/chatgpt/utils/utils.go
- Stored conversation history directory and files:
- directory
0700and files0600 history/store.go
- directory
- Log dir permissions:
-
Reduced plan logging output
- Removed writing the raw plan JSON artifact (keeps normalized plan logging).
- Code reference:
agent/planexec/plan.go
-
Dependency updates
- Updated testing/dependency versions (e.g.,
gomega,ginkgo, and relatedgolang.org/x/*tooling updates reflected ingo.sum). - Code references:
go.mod,go.sum
- Updated testing/dependency versions (e.g.,
Upgrade Notes
-
Homebrew (recommended):
- Run:
brew upgrade chatgpt-cli
- Run:
-
Direct download:
- Download the prebuilt binary for your specific OS/architecture from the project’s release artifacts, then replace your existing
chatgpt-clibinary with the new one (ensure it is executable and on yourPATH).
- Download the prebuilt binary for your specific OS/architecture from the project’s release artifacts, then replace your existing
ChatGPT CLI v1.10.9
New Features:
- Enhanced Diff Application with Fuzzy Matching:
- Introduced a new feature that improves how diffs are applied by allowing for "fuzzy" matches around preferred indexes. This feature aims to increase the robustness of applying patches where multiple matching contexts exist.
- Code reference:
unified_diff.go,unified_diff_test.go
Improvements:
-
Improved Error Messaging:
- Updated error messages to include more contextual information, such as diff line numbers. This enhancement helps in diagnosing issues more effectively.
- Code reference:
unified_diff.go
-
Refactor and Cleanup:
- Code refactoring to improve readability and maintainability, focusing on the diff utilities module.
- Code reference:
unified_diff.go,unified_diff_test.go
Bug Fixes:
- Patch Context Matching Issues:
- Resolved bugs where patch application would fail due to context mismatches. Now, the application logic correctly identifies and matches the context even in complex scenarios.
- Code reference:
unified_diff.go,unified_diff_test.go
Other Changes:
-
Test Suite Expansion:
- Added numerous test cases to thoroughly validate the new fuzzy diff application logic, ensuring correctness across various scenarios.
- Code reference:
unified_diff_test.go
-
Removed Obsolete Assets:
- Deleted redundant
agent.giffiles from the repository to reduce clutter. - Code reference: Removed
agent.gif
- Deleted redundant
Upgrade Notes:
- The release version v1.10.9 introduces improvements and features requiring a system update. You can update to the latest version using one of the following methods:
- Run
brew upgrade chatgpt-cli, if you are using Homebrew. - Alternatively, download the binaries directly from our official releases page for your specific operating system.
- Run
We hope you enjoy these improvements and appreciate your support and feedback as we continue to enhance our software.
ChatGPT CLI v1.10.8
New Features
- Enhanced ReAct Agent Logic:
- Implemented improved iterative reasoning and action mechanisms.
- The agent now recovers more gracefully from models producing invalid JSON in response.
- Enhanced in-band recovery and error messaging for better user interaction.
- Code reference:
agent/react/react_agent.go
Improvements
-
Code Refactoring:
- The codebase has been reorganized for greater modularity, splitting different logical parts into dedicated packages (such as
core,planexec,react, andtools). - Clear separation of concerns, improving both readability and maintainability.
- Code reference: Multiple files under
agent/,tools/, andcore/directories.
- The codebase has been reorganized for greater modularity, splitting different logical parts into dedicated packages (such as
-
Policy Enforcement Updates:
- Improved safety checks within the agent policy model.
- Enhanced context-specific guidance to prevent undesired actions.
- Code reference:
agent/core/policy.go
-
Improved Budget Handling:
- Better error handling when budget constraints are exceeded, providing clearer feedback to users.
- More robust handling of LLM token budgets, making iterative tasks more predictable.
- Code reference:
agent/core/budget.go
Bug Fixes
-
Tool Integration:
- Fixed issues where file operations might not respect path constraints properly.
- Addressed shell tool command handling errors, particularly with variadic arguments.
- Code reference: Various files within
tools/
-
Template Processing:
- Resolved issues with Go template rendering within agent steps, reducing the occurrence of template syntax errors.
- Code reference:
agent/planexec/template_step.go
-
Compatibility and Resilience:
- Corrected JSON parsing logic to handle output wrapped in markdown code fences correctly.
- Enhanced compatibility with different JSON action types generated by the model.
- Code reference:
agent/react/react_agent.go
Other Changes
- Testing Enhancements:
- Expanded unit test coverage to validate new behaviors and ensure system robustness against unexpected input.
- Increased resilience against external dependencies changes.
- Code reference: Various test files under
agent/planexec/andagent/react/
Upgrade Notes
To upgrade to the latest version of chatgpt-cli, you may use the following methods:
- Using Homebrew:
brew upgrade chatgpt-cli
- Direct Download:
- Download the appropriate binaries for your operating system from the releases page of the project.
Ensure to back up any configuration files or essential data before you upgrade, especially if you have custom configurations in place.
ChatGPT CLI v1.10.7
New Features
- Patch and Replace File Operations: Introduced
PatchFileandReplaceBytesInFilemethods on theFilesinterface to allow more efficient in-place file modifications without needing to read the entire content.PatchFileMethod: Applies a unified diff to a file.ReplaceBytesInFileMethod: Replaces byte patterns with new data in a file, supporting controlled occurrences.
Improvements
- Unified Diff Parsing: Enhanced diff parsing capability with robust handling of edge cases and strict adherence to unified diff standards.
- Error Handling in Operations: Improved error messages and handling, particularly in
PatchFileandReplaceBytesInFile, making the operations more resilient and informative when issues are encountered. - Logging Improvements: Adjustments to log file creation and opening process to truncate files instead of appending to existing ones, leading to cleaner log management.
Bug Fixes
- Policy Enforcement Adjustments: Correct handling of file operation permissions in policies, fixing issues where certain operations could be allowed or denied incorrectly based on configuration.
- OutcomeError Handling: Modified behavior to surface errors within the system through
OutcomeError, allowing agents to notice and react to changes or anomalies during execution.
Other Changes
- Integration and Unit Test Expansions: Added comprehensive tests for newly implemented file operations ensuring reliability and correctness through various scenarios.
- Refactorings in
react_agent.go: Cleaned up the logic for running actions, ensuring better readability and maintainability. - Runtime Enhancements: Minor runtime structures and logic updates for more efficient running of agent goals and budget management.
Upgrade Notes
To upgrade to v1.10.7, you can use Brew or directly download binaries:
- Via Homebrew: Execute
brew upgrade chatgpt-cliin your terminal. - For a direct download, obtain the binaries specific to your operating system from the official release page.
Ensure your configuration settings in config.yaml are updated according to any newly introduced options if applicable.
ChatGPT CLI v1.10.6
New Features
- Enhanced Logging System:
- Introduced the ability to sync logs manually for both human-readable and debug logs using new sync functions.
- Modified logger output to better distinguish between transcript (plain text) and debug (JSONL) formats.
- Code references:
agent/log.go,agent/agent.go
Improvements
-
Code Refactoring for Logging:
- Adapted
agent.goto utilizezapcore.NewTeefor simultaneous logging to the terminal and to a transcript file, enhancing the readability and accuracy of the logs during operations. - Improved the efficiency of log management by ensuring that syncing operations are embedded within the logger's base options.
- Code references:
cmd/chatgpt/main.go,agent/log.go
- Adapted
-
Documentation Update:
- Expanded the
AGENTS.mdfile with clearer instructions and more detailed project layout explanations to aid developers in contributing effectively. - Code reference:
AGENTS.md
- Expanded the
Bug Fixes
- Testing and Mocks Update:
- Rectified unnecessary clock expectations in test cases, ensuring a more accurate and simplified test environment.
- Code references:
agent/react_agent_test.go
Other Changes
- Testing Enhancements:
- Upgraded test routines by integrating
sclevine/specandgomegaconventions, safeguarding that both unit and integration tests conform to a standard format. - Code references:
agent/react_agent_test.go
- Upgraded test routines by integrating
Upgrade Notes
To upgrade to the latest version of the chatgpt-cli, follow these steps:
- If you have Homebrew installed, run the command:
brew upgrade chatgpt-cli - Alternatively, you can directly download the precompiled binaries appropriate for your operating system from our release page.
This new release continues to strengthen our commitment to delivering a robust and efficient tool, enhancing the user experience with each update. We hope you enjoy the new features and improvements. If you have any feedback or run into any issues, please feel free to reach out to us.
Thank you for using chatgpt-cli!
ChatGPT CLI v1.10.5
New Features
- Repetition Guard for ReAct Agent:
- Introduced a new mechanism to prevent repetitive actions in the ReAct agent, enhancing decision-making and reducing redundant command executions.
- Code reference:
agent/react_agent.go
Improvements
- Enhanced Action Type Handling:
- Improved the handling of action types in the ReAct agent, now supporting shorthand notation for tools like ‘file’, ‘shell’, and ‘llm’.
- This update makes the agent more robust and ensures that incorrect shorthand usage leads to actionable errors.
- Code reference:
agent/react_agent.go
Bug Fixes
- Fixed Validation for Inconsistent Shorthand Usage:
- Corrected an issue where using inconsistent shorthand action types with tools would not validate correctly, potentially leading to execution errors.
- Code reference:
agent/react_agent.go
Other Changes
-
Documentation Overhaul:
- The
AGENTS.mddocument has been significantly condensed and rewritten to provide clear guidance and structured information for both contributors and users regarding how to work with the CLI application. - Code reference:
AGENTS.md
- The
-
Testing Enhancements:
- Added comprehensive tests for new functionality in the ReAct agent to ensure that changes adhere to expected standards and behaviors.
- Code reference:
agent/react_agent_test.go
Upgrade Notes
To upgrade to version v1.10.5, you can use the following methods:
-
With Homebrew:
brew upgrade chatgpt-cli -
Direct Download:
Visit the release page to download binaries for your specific operating system.
ChatGPT CLI v1.10.4
This release introduces several new features, optimizations, bug fixes, and additional changes aimed at enhancing the overall functionality and usability of the project. Below is a summary of the key updates included in this version.
New Features
-
AGENTS.md Documentation:
- Added a comprehensive
AGENTS.mdfile outlining the architecture and usage of the ChatGPT CLI, including experimental agent modes like ReAct and Plan/Execute. - This document serves as an orientation guide for automated agents and contributors, detailing the repository's structure and core functionalities.
- Added a comprehensive
-
Proof of Concept Image:
- A new image (
poc.png) has been added to thecmd/chatgpt/resources/directory to support visualization needs for development and promotional purposes.
- A new image (
Improvements
- ReAct Agent Logic Refinement:
- Enhanced the parsing logic of the ReAct agent to improve JSON object extraction, ensuring more reliable interpretation of responses.
- Updated CRITICAL RULES for JSON response consistency, emphasizing single-action responses and clear formatting guidelines.
Bug Fixes
- JSON Parsing in ReAct Agent:
- Fixed a bug in the ReAct agent that incorrectly parsed JSON strings, leading to potential errors during agent operation. Refined the error handling to provide more descriptive feedback when parsing fails.
Other Changes
-
Refactored Agent Execution Flow:
- Streamlined the code execution path within the
runAgentfunction by removing redundant logger initializations and improving the layout of debugging logs.
- Streamlined the code execution path within the
-
Testing Adjustments:
- Updated unit tests (
react_agent_test.go) to ensure they align with new parsing error messages, strengthening overall test coverage and reliability.
- Updated unit tests (
Upgrade Notes
To upgrade to this release:
- Use Homebrew: Run
brew upgrade chatgpt-cliin your terminal. - Alternatively, download the latest binaries directly for your operating system from the releases page.
This release focuses on improving the robustness of the ChatGPT CLI, offering clearer integration pathways for new users and contributors while maintaining backward compatibility. For further details, please refer to the updated documentation provided in this release.
ChatGPT CLI v1.10.3
New Features
- Agent Mode:
- ReAct Mode: The new default mode that iteratively uses reasoning and acting (think→act→observe) to accomplish tasks.
- Plan/Execute Mode: Generates an entire plan first and then executes the steps sequentially. This workflow is designed for more complex, multi-step tasks.
- Agent Configuration: Enhanced configuration options to define the agent's behavior, budgets, and policies.
- Logging and Reporting: Detailed execution logs are now generated for agent operations, stored in a dedicated directory for easy access and review.
Improvements
- Enhanced Shell and File System Operations:
- Expanded shell command and file operation capabilities and safety controls to prevent unintended access or modification of important data.
- Performance Optimizations:
- Quickened response time for iterative tasks through refined logic and improved resource handling.
Bug Fixes
- Command Handling: Resolved issues where commands or file operations would fail under specific conditions due to policy limitations.
- Template Parsing: Fixed errors in handling templates that affected task execution reliability.
Other Changes
- Updated Smoke Test Scripts: More extensive automated testing has been introduced to ensure the robustness of new features, ensuring broader compatibility and reliability.
- Refactoring for Maintainability: Code has been refactored to improve readability and maintainability, incorporating community feedback and code improvements.
Upgrade Notes
- How to Update:
- If you installed
chatgpt-clivia Homebrew, simply run:brew upgrade chatgpt-cli. - Alternatively, download the binaries directly from Github Releases for your specific operating system.
- If you installed
This version adds significant features and improvements aimed at enhancing the usability and functionality of the software for complex task execution scenarios. We encourage users to explore the new agent modes and provide feedback on their experiences.
ChatGPT CLI v1.10.2
New Features:
- Web search (opt-in): Enable compatible models (gpt-5 family, non “-search” variants) to fetch live web data during a query.
- How to enable: --web and --web-context-size [low|medium|high], or set web and web_context_size in config.
- Implementation details: Automatically routes via the Responses API and injects a web_search tool with search_context_size.
- Compatibility: Not supported by realtime models and blocked for non-gpt-5 or gpt-5-search models.
- Code references: api/client/llm.go, api/responses.go, cmd/chatgpt/main.go, README.md, docs/chatgpt_api.md
Improvements:
- Capability-driven request shaping:
- Added capability flags: SupportsTopP, SupportsWebSearch, IsRealtime.
- Temperature and top_p are now included conditionally based on model support (e.g., top_p omitted for gpt-5).
- Forces Responses API when web search is enabled.
- Code references: api/client/llm.go, api/client/llm_test.go
- Model effort applicability: effort now documented as applicable to gpt-5 and o1-pro models.
- Code reference: README.md
- Documentation updates:
- README config table now includes web and web_context_size options.
- Fixed API endpoint docs and clarified capabilities.
- Added a Web Search example to the API docs.
- Code references: README.md, docs/chatgpt_api.md
Bug Fixes:
- Corrected Audio API endpoint paths in documentation:
- speech_path: /v1/audio/speech
- transcriptions_path: /v1/audio/transcriptions
- Code reference: README.md
- CLI flag validation messages fixed to match actual flag names (mcp-param, mcp-params).
- Code references: cmd/chatgpt/utils/utils.go, cmd/chatgpt/utils/utils_test.go
Other Changes:
- Robust capability tests and web search tests added (including error cases for unsupported models and realtime).
- Code reference: api/client/llm_test.go
- New capabilities test suite for a range of models (gpt-4o, gpt-5, gpt-5-search, o1 variants, realtime).
- Code reference: api/client/client_test.go, api/client/llm_test.go
- API type additions for tools in Responses requests (web_search with search_context_size).
- Code reference: api/responses.go
Upgrade Notes:
- How to update:
- Homebrew: brew upgrade chatgpt-cli
- Direct download: Download the latest binaries for your OS from the releases page and replace your existing executable.
- Enabling web search:
- Use a gpt-5 family model (excluding -search and realtime variants), pass --web and optionally --web-context-size [low|medium|high], or set web and web_context_size in config.
- The CLI will automatically use the Responses API and attach the web_search tool when web is enabled.
- CLI flag changes:
- If you previously used --param or --params with MCP, switch to --mcp-param and --mcp-params. Using these without --mcp will produce an error.
• Endpoint clarifications: - Ensure any scripts or configs referencing audio endpoints use /v1/audio/speech and /v1/audio/transcriptions as documented.
- If you previously used --param or --params with MCP, switch to --mcp-param and --mcp-params. Using these without --mcp will produce an error.