Skip to content

Commit 1a7a712

Browse files
committed
fix: prevent spurious agent startup in dev mode and remove tiktoken dep
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.
1 parent 33523a6 commit 1a7a712

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,6 @@ dependencies = [
20952095
"mcp >= 1.19.0",
20962096
"langchain-mcp-adapters >= 0.1.11",
20972097
"langchain >= 1.0.3",
2098-
"tiktoken == 0.11.0",
20992098
"bedrock-agentcore >= 1.0.3",
21002099
"botocore[crt] >= 1.35.0",
21012100
{{#if (eq modelProvider "Bedrock")}}

src/assets/python/langchain_langgraph/base/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dependencies = [
1515
"mcp >= 1.19.0",
1616
"langchain-mcp-adapters >= 0.1.11",
1717
"langchain >= 1.0.3",
18-
"tiktoken == 0.11.0",
1918
"bedrock-agentcore >= 1.0.3",
2019
"botocore[crt] >= 1.35.0",
2120
{{#if (eq modelProvider "Bedrock")}}

src/cli/tui/hooks/useDevServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function useDevServer(options: { workingDir: string; port: number; agentN
8787
}, [options.workingDir]);
8888

8989
const config: DevConfig | null = useMemo(() => {
90-
if (!project) {
90+
if (!project || !options.agentName) {
9191
return null;
9292
}
9393
return getDevConfig(options.workingDir, project, configRoot, options.agentName);

src/schema/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export const RESERVED_PROJECT_NAMES: readonly string[] = [
9595
'pytest',
9696
'pytestasyncio',
9797
'pythondotenv',
98-
'tiktoken',
9998
// Build tools
10099
'hatchling',
101100
'setuptools',

0 commit comments

Comments
 (0)