Skip to content

fix: prevent spurious agent startup in dev mode and remove tiktoken#454

Merged
jesseturner21 merged 1 commit intomainfrom
fix/dev-spurious-agent-start-and-remove-tiktoken
Feb 26, 2026
Merged

fix: prevent spurious agent startup in dev mode and remove tiktoken#454
jesseturner21 merged 1 commit intomainfrom
fix/dev-spurious-agent-start-and-remove-tiktoken

Conversation

@tejaskash
Copy link
Contributor

Summary

  • Dev mode bug: When running agentcore dev with multiple agents, the first agent's server would briefly start before the user selected one. This happened because useDevServer called getDevConfig with agentName: undefined, which defaults to agents[0]. Added a guard so the server only starts after an agent is explicitly selected.
  • Remove tiktoken: Removed tiktoken == 0.11.0 from the LangChain/LangGraph template dependencies as the package no longer resolves correctly. Also removed it from the reserved project names list.

Test plan

  • Run agentcore dev in a project with 2+ agents — verify only the selected agent's server starts (no brief startup of the first agent)
  • Run agentcore dev --agent <name> — verify single-agent and --agent flag flows still work
  • Create a new LangChain project — verify pyproject.toml no longer includes tiktoken
  • npm test passes (149 test files, 1 snapshot updated)

When running `agentcore dev` with multiple agents, useDevServer would
start the first agent's server before the user selected one, because
getDevConfig defaults to agents[0] when agentName is undefined. Guard
config resolution on agentName being set so the server only starts
after explicit selection.

Also remove tiktoken from the LangChain template dependencies as the
package no longer resolves correctly.
@tejaskash tejaskash requested a review from a team February 25, 2026 22:53
@github-actions github-actions bot added the size/xs PR size: XS label Feb 25, 2026
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.15% 3000 / 6795
🔵 Statements 43.72% 3159 / 7224
🔵 Functions 45.96% 621 / 1351
🔵 Branches 48.71% 1960 / 4023
Generated in workflow #728 for commit 1a7a712 by the Vitest Coverage Report Action

@jesseturner21 jesseturner21 merged commit ac62c4e into main Feb 26, 2026
15 of 19 checks passed
@jesseturner21 jesseturner21 deleted the fix/dev-spurious-agent-start-and-remove-tiktoken branch February 26, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants