add support for compatible custom tools (compatible_with)#550
Open
johnrichardrinehart wants to merge 2 commits intoasheshgoplani:mainfrom
Open
add support for compatible custom tools (compatible_with)#550johnrichardrinehart wants to merge 2 commits intoasheshgoplani:mainfrom
compatible_with)#550johnrichardrinehart wants to merge 2 commits intoasheshgoplani:mainfrom
Conversation
Several test packages were reading the developer's real ~/.agent-deck state, reusing fixed tmux fixture names, and assuming classic shell prompts and a single quit path. That made go test ./... fail nondeterministically depending on local config, shell theme, and leftover tmux sessions. This change gives the tmux/session/integration/UI/TUI tests a temporary HOME, restores shell-friendly non-sandbox startup, broadens shell prompt detection, uses unique control-pipe fixture sessions, and makes the smoke tests tolerant of confirmation and remain-on-exit behavior. Constraint: tmux-backed tests must remain runnable on machines with custom prompts and existing ~/.agent-deck state Rejected: Skip the tmux smoke/integration tests by default | would hide real regressions in the main test path Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep package TestMain isolation in place for any test suite that touches tmux, HOME, or ~/.agent-deck state Tested: go test ./... in the working tree with the same test-fix diff applied; focused reruns for internal/tmux, internal/session, internal/integration, internal/ui, and internal/tuitest Not-tested: clean-worktree full go test ./... under disk-full conditions (verification there hit no-space errors unrelated to code)
Keep configured custom tool names during tmux-based tool detection instead of rewriting them to built-in tool names. This fixes restart and resume flows where a custom wrapper such as my-codex could be persisted as codex and later resumed with the wrong executable. Introduce a generic compatible_with tool setting and use it in both Claude and Codex compatibility checks. This keeps the exact executable-name fallback for built-ins while giving wrapper commands an explicit, upstream-friendly opt-in path. Route Codex-specific restart, readiness, response parsing, hook handling, and session tracking through IsCodexCompatible, and build Codex resume commands from the configured command for compatible wrappers. That preserves wrapper execution on restart instead of hard-coding plain codex. Add regression coverage for compatible custom tools and wrapper commands without relying on machine-specific paths or out-of-tree scripts.
b40cc22 to
a541040
Compare
Contributor
Author
compatible_with)
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
compatible_withsettingExample configuration
This lets
my-codexbehave like Codex for agent-deck feature handling while still preserving the custom tool name and command.Example wrapper script
For example, save that as
~/bin/my-codex, make it executable, and then point the tool config atmy-codex.Testing
go test ./...compatible_with = "codex"codexNotes
compatible_with = "codex"and it is working great