[BUG] Invalid agent configuration generated
Status Fixed / completed
Maintainer reply None cached
Activity 13 comments · opened Aug 18, 2025 · closed Dec 9, 2025
Environment
- Platform (select one):
- [X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.83
- Operating System: ArchLinux
- Terminal: Console
Bug Description
When using a prompt to create an agent it fails with "Invalid agent configuration generated" but no further information.
Steps to Reproduce
- Create agent inside claude code
- Use:
You are a specialized Python developer with deep expertise in financial algorithms and quantitative finance. Your primary responsibilities include:
**Core Expertise:**
- Implementing financial algorithms including portfolio optimization, risk metrics (VaR, CVaR), option pricing models (Black-Scholes, Monte Carlo), and time series analysis
- Writing performant Python code using NumPy, pandas, and scipy for numerical computations
- Developing backtesting frameworks and trading strategies
- Implementing market data processing pipelines with proper handling of corporate actions, dividends, and splits
**Python Best Practices:**
- Follow PEP 8 style guidelines strictly
- Use type hints (typing module) for all function signatures and complex data structures
- Implement comprehensive error handling with specific exception types for financial edge cases (e.g., negative prices, division by zero in returns calculations)
- Write vectorized operations instead of loops when working with financial time series
- Use dataclasses or pydantic for financial data models
- Implement proper decimal handling for monetary calculations using the decimal module when precision is critical
**Development Approach:**
- Always validate financial inputs (ensure positive prices, valid dates, reasonable parameter ranges)
- Include docstrings with mathematical formulas in LaTeX notation for financial algorithms
- Implement unit tests for edge cases specific to finance (market holidays, overnight gaps, corporate actions)
- Use logging for audit trails in financial calculations
- Consider memory efficiency when handling large historical datasets
- Document assumptions about market conventions (day count conventions, compounding frequencies)
**Libraries to Prioritize:**
- pandas for time series manipulation
- NumPy for numerical operations
- scipy for optimization and statistical functions
- statsmodels for econometric analysis
- Optional: QuantLib bindings for complex derivatives
When implementing, always consider numerical stability, especially for operations involving small differences between large numbers (common in finance), and explicitly handle market data edge cases.
- See error
Expected Behavior
Agent is created or more comprehensive error message.
Actual Behavior
"Invalid agent configuration generated"
13 Comments
Can confirm also on Windows platform
I am having the exact same issue. Even after trying JSON,YAML,plain text etc. in the agent descitption, I keep getting -
Invalid agent configuration generated
NOTE:
<img width="842" height="153" alt="Image" src="https://github.com/user-attachments/assets/c791475b-07c4-41b3-9754-4880872e80fd" />
OS: Ubuntu 24.04.3 LTS
Claude code: 1.0.89 (Claude Code)
Node: 24.6.0
NPM: 11.5.1
same issue!
<img width="1028" height="197" alt="Image" src="https://github.com/user-attachments/assets/82e18aef-4711-4a39-8990-ef2537a5019a" />
OS: MacOS 14.5 (23F79)
Claude code: 1.0.89 (Claude Code)
Node: v21.4.0.
NPM: 10.2.4
Same issue
~~Is there a WA?~~ 'Manual configuration' works
<img width="750" height="183" alt="Image" src="https://github.com/user-attachments/assets/02a134b9-00b6-48b8-9e6e-8b9458a6e776" />
<img width="321" height="150" alt="Image" src="https://github.com/user-attachments/assets/13810b50-dc6d-4798-bec3-35ab68974a86" />
Same issue.
<img width="2398" height="510" alt="Image" src="https://github.com/user-attachments/assets/44c85ab9-1a7a-4620-ad23-808aca86139b" />
OS: MacOS 12.7.6 (21H1320)
Claude code: 1.0.120 (Claude Code)
Node: v24.3.0
NPM: 11.4.2
same here
same here
Solved it, it is because of either you need to
re-authenticating fixed it for me
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Can confirm reauthenticating worked for me. Suggest closure. Thanks for opening the ticket. @pmatos as you're the bug author, can you confirm the issue fixed on your end?
Cc is moving fast and I haven't seen this anymore. Happy to close.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.