Skip to content

fix: open --no-agent sets agent to 'shell' instead of inheriting session agent#344

Merged
Wirasm merged 2 commits into
mainfrom
kild/288-open-no-agent-name
Feb 11, 2026
Merged

fix: open --no-agent sets agent to 'shell' instead of inheriting session agent#344
Wirasm merged 2 commits into
mainfrom
kild/288-open-no-agent-name

Conversation

@Wirasm

@Wirasm Wirasm commented Feb 11, 2026

Copy link
Copy Markdown
Owner

Summary

When kild open --no-agent is used on a kild originally created with an agent (e.g., claude), the spawn record's agent field showed the session's original agent name instead of "shell". This caused incorrect display in kild list, kild status, and JSON output, though the actual command (/bin/zsh) ran correctly.

Root Cause

The BareShell match arm in open_session used session.agent.clone() (the session's original agent) instead of the literal "shell" that create_session correctly uses.

Changes

File Change
crates/kild-core/src/sessions/handler.rs Fixed BareShell arm to use "shell".to_string() matching create_session pattern

Testing

  • cargo fmt --check passes
  • cargo clippy --all -- -D warnings passes
  • cargo test --all passes (all 874 tests)

Validation

cargo fmt --check && cargo clippy --all -- -D warnings && cargo test --all

Issue

Fixes #288

…ion agent (#288)

The BareShell match arm in open_session used session.agent.clone() which
inherited the original agent name (e.g. "claude") instead of "shell".
This caused incorrect display in list/status output despite the actual
shell command running correctly.

Fixes #288
@Wirasm

Wirasm commented Feb 11, 2026

Copy link
Copy Markdown
Owner Author

Automated Code Review

Summary

Clean, minimal fix that correctly addresses the root cause. No issues found.

Findings

Strengths

  • Matches the established create_session pattern at line 75 exactly
  • Removes the misleading comment alongside the fix
  • Single-line change with zero blast radius — only affects spawn record metadata

Security

  • No security concerns. Change is limited to a string literal in a metadata field.

Checklist

  • Fix addresses root cause (BareShell arm using session's original agent instead of "shell")
  • Code follows codebase patterns (mirrors create_session at line 75)
  • All 874 tests pass
  • No bugs introduced

@Wirasm Wirasm merged commit 124acfd into main Feb 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

open --no-agent inherits session agent name instead of 'shell' in spawn record

1 participant