Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Fix TestAgentIntrospect: TmuxAvailable should reflect agent type#289

Merged
jsell-rh merged 1 commit intojsell-rh:mainfrom
tiwillia-ai-bot:fix/test-agent-introspect-tmux-available
Mar 23, 2026
Merged

Fix TestAgentIntrospect: TmuxAvailable should reflect agent type#289
jsell-rh merged 1 commit intojsell-rh:mainfrom
tiwillia-ai-bot:fix/test-agent-introspect-tmux-available

Conversation

@tiwillia-ai-bot
Copy link
Copy Markdown

Summary

  • Fixed TestAgentIntrospect test failure by correcting the logic for the tmux_available field in introspect responses
  • The field should indicate whether an agent's type allows session management, not whether tmux is currently installed

Problem

The test was failing because TmuxAvailable was computed as:

TmuxAvailable: !isNonSessionAgent(agent) && backend.Available()

In test environments without tmux installed, backend.Available() returns false, causing the test to fail even though the agent type (unregistered/default) should be session-compatible.

Solution

Removed the backend.Available() check. The field now only checks the agent's registration type:

TmuxAvailable: !isNonSessionAgent(agent)

Test Results

  • ✅ TestAgentIntrospect now passes
  • ✅ TestAgentIntrospectNonTmux still passes
  • ✅ All coordinator tests pass (10.696s)

Rationale

TmuxAvailable represents a property of the agent's configuration (whether it can be managed via session lifecycle), not the runtime environment (whether tmux is installed). This separation is important because:

  1. Agents without an explicit agent_type are session-compatible by default
  2. The field is used to determine if spawn/stop/restart endpoints should be available
  3. Backend availability is an infrastructure concern, not an agent type property

🤖 Generated with Claude Code

… backend availability

The TmuxAvailable field in the introspect response should indicate whether
the agent's registration type allows session-based lifecycle management
(spawn/stop/restart), not whether tmux is currently installed on the system.

For agents without an explicit registration or with session-compatible types
(tmux/ambient/""), TmuxAvailable should be true regardless of whether the
backend is actually available at runtime.

This fixes the test failure where unregistered agents would incorrectly
report TmuxAvailable=false in environments without tmux installed.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jsell-rh jsell-rh merged commit 30f7ca8 into jsell-rh:main Mar 23, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants