Skip to content

Handle case where the tool-call command is nil#296

Merged
xenodium merged 1 commit intoxenodium:mainfrom
genegoykhman:fix-unexpected-tool-call
Feb 17, 2026
Merged

Handle case where the tool-call command is nil#296
xenodium merged 1 commit intoxenodium:mainfrom
genegoykhman:fix-unexpected-tool-call

Conversation

@genegoykhman
Copy link
Contributor

@genegoykhman genegoykhman commented Feb 17, 2026

Fixes #297

Checklist

  • I've read the README's Contributing section.
  • [n/a] I've filed a feature request/discussion for a new feature.
  • My code follows the project style.
  • [n/a] I've added tests where applicable.
  • [n/a] I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.
  • I've reviewed all code in PR myself and will vouch for its quality.

Description

When using agent-shell with Anthropic's Claude Code I was getting this error immediately upon issuing my first prompt:

Debugger entered--Lisp error: (error "Unexpected tool-call command type: symbol")
  error("Unexpected tool-call command type: %S" symbol)

It looks like agent-shell--tool-call-command-to-string emits this error when the passed command parameter is nil, which it evidently can be sometimes. This PR simply adds a graceful fallback when command is nil.

@xenodium xenodium merged commit d826f8b into xenodium:main Feb 17, 2026
@xenodium
Copy link
Owner

Thank you

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.

Unexpected tool-call command type error with Claude Code

2 participants