feat: add auth policy disclaimer and repo maintenance notice

Add prominent warnings about Anthropic's Agent SDK policy regarding
subscription-based authentication for third-party agents. Users are
now advised to use API keys instead of `claude login` to avoid
potential account suspension.

Changes:
- README: Add WARNING and NOTE admonition boxes at top (auth policy
  + repo no longer actively maintained)
- README: Flip auth recommendation to API key first, subscription second
- SettingsModal: Add amber warning Alert when Claude provider is selected
- auth.py: Update CLI/server help messages to recommend API key as Option 1
- Start scripts (start.sh, start.bat, start_ui.sh): Mention ANTHROPIC_API_KEY
  alongside claude login in all auth hints
- start.py, autonomous_agent_demo.py: Update help text references

No functionality removed — subscription auth still works, warnings are
informational only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Auto
2026-03-26 11:45:45 +02:00
parent bcb771734e
commit e0cd0b721e
8 changed files with 50 additions and 23 deletions

View File

@@ -4,6 +4,12 @@
A long-running autonomous coding agent powered by the Claude Agent SDK. This tool can build complete applications over multiple sessions using a two-agent pattern (initializer + coding agent). Includes a React-based UI for monitoring progress in real-time. A long-running autonomous coding agent powered by the Claude Agent SDK. This tool can build complete applications over multiple sessions using a two-agent pattern (initializer + coding agent). Includes a React-based UI for monitoring progress in real-time.
> [!WARNING]
> **Authentication:** Anthropic's policy states that third-party developers may not offer `claude.ai` login or subscription-based rate limits for their products (including agents built on the Claude Agent SDK) unless previously approved. Using your Claude subscription with AutoForge may risk account suspension. We recommend using an API key from [console.anthropic.com](https://console.anthropic.com/) instead.
> [!NOTE]
> **This repository is no longer actively maintained.** Most agent coding tools now ship their own long-running harnesses, making this project less necessary. Feel free to fork and continue development on your own!
## Video Tutorial ## Video Tutorial
[![Watch the tutorial](https://img.youtube.com/vi/nKiPOxDpcJY/hqdefault.jpg)](https://youtu.be/nKiPOxDpcJY) [![Watch the tutorial](https://img.youtube.com/vi/nKiPOxDpcJY/hqdefault.jpg)](https://youtu.be/nKiPOxDpcJY)
@@ -34,8 +40,8 @@ irm https://claude.ai/install.ps1 | iex
You need one of the following: You need one of the following:
- **Claude Pro/Max Subscription** - Use `claude login` to authenticate (recommended) - **Anthropic API Key** (recommended) - Pay-per-use from https://console.anthropic.com/
- **Anthropic API Key** - Pay-per-use from https://console.anthropic.com/ - **Claude Pro/Max Subscription** - Use `claude login` to authenticate (see warning above)
--- ---
@@ -101,7 +107,7 @@ This launches the React-based web UI at `http://localhost:5173` with:
The start script will: The start script will:
1. Check if Claude CLI is installed 1. Check if Claude CLI is installed
2. Check if you're authenticated (prompt to run `claude login` if not) 2. Check if you're authenticated (prompt to configure authentication if not)
3. Create a Python virtual environment 3. Create a Python virtual environment
4. Install dependencies 4. Install dependencies
5. Launch the main menu 5. Launch the main menu
@@ -371,7 +377,7 @@ Edit `security.py` to add or remove commands from `ALLOWED_COMMANDS`.
Install the Claude Code CLI using the instructions in the Prerequisites section. Install the Claude Code CLI using the instructions in the Prerequisites section.
**"Not authenticated with Claude"** **"Not authenticated with Claude"**
Run `claude login` to authenticate. The start script will prompt you to do this automatically. Set your API key via `ANTHROPIC_API_KEY` environment variable or the Settings UI. Alternatively, run `claude login` to use subscription credentials, but note that Anthropic's policy may not permit subscription-based auth for third-party agents.
**"Appears to hang on first run"** **"Appears to hang on first run"**
This is normal. The initializer agent is generating detailed test cases, which takes significant time. Watch for `[Tool: ...]` output to confirm the agent is working. This is normal. The initializer agent is generating detailed test cases, which takes significant time. Watch for `[Tool: ...]` output to confirm the agent is working.

22
auth.py
View File

@@ -53,11 +53,16 @@ AUTH_ERROR_HELP_CLI = """
Claude CLI requires authentication to work. Claude CLI requires authentication to work.
To fix this, run: Option 1 (Recommended): Set an API key
export ANTHROPIC_API_KEY=your-key-here
Get a key at: https://console.anthropic.com/
Option 2: Use subscription login
claude login claude login
This will open a browser window to sign in. Note: Anthropic's policy may not permit using
After logging in, try running this command again. subscription auth with third-party agents.
API key authentication is recommended.
================================================== ==================================================
""" """
@@ -69,11 +74,16 @@ AUTH_ERROR_HELP_SERVER = """
Claude CLI requires authentication to work. Claude CLI requires authentication to work.
To fix this, run: Option 1 (Recommended): Set an API key
export ANTHROPIC_API_KEY=your-key-here
Get a key at: https://console.anthropic.com/
Option 2: Use subscription login
claude login claude login
This will open a browser window to sign in. Note: Anthropic's policy may not permit using
After logging in, try starting the agent again. subscription auth with third-party agents.
API key authentication is recommended.
================================================================================ ================================================================================
""" """

View File

@@ -76,8 +76,8 @@ Examples:
python autonomous_agent_demo.py --project-dir my-app --testing-ratio 0 python autonomous_agent_demo.py --project-dir my-app --testing-ratio 0
Authentication: Authentication:
Uses Claude CLI authentication (run 'claude login' if not logged in) Uses Claude CLI authentication. API key (ANTHROPIC_API_KEY) is recommended.
Authentication is handled by start.bat/start.sh before this runs Alternatively run 'claude login', but note Anthropic's policy may restrict subscription auth.
""", """,
) )

View File

@@ -29,11 +29,12 @@ REM verify the CLI is installed and remind the user to login if needed
set "CLAUDE_DIR=%USERPROFILE%\.claude" set "CLAUDE_DIR=%USERPROFILE%\.claude"
if exist "%CLAUDE_DIR%\" ( if exist "%CLAUDE_DIR%\" (
echo [OK] Claude CLI directory found echo [OK] Claude CLI directory found
echo ^(If you're not logged in, run: claude login^) echo ^(Set ANTHROPIC_API_KEY or run: claude login^)
) else ( ) else (
echo [!] Claude CLI not configured echo [!] Claude CLI not configured
echo. echo.
echo Please run 'claude login' to authenticate before continuing. echo Please set ANTHROPIC_API_KEY or run 'claude login' to authenticate.
echo Note: API key auth is recommended. See README for details.
echo. echo.
pause pause
) )

View File

@@ -255,7 +255,7 @@ def run_spec_creation(project_dir: Path) -> bool:
print(f"Please ensure app_spec.txt exists in: {get_project_prompts_dir(project_dir)}") print(f"Please ensure app_spec.txt exists in: {get_project_prompts_dir(project_dir)}")
# If failed with non-zero exit and no spec, might be auth issue # If failed with non-zero exit and no spec, might be auth issue
if result.returncode != 0: if result.returncode != 0:
print("\nIf you're having authentication issues, try running: claude login") print("\nIf you're having authentication issues, set ANTHROPIC_API_KEY or try: claude login")
return False return False
except FileNotFoundError: except FileNotFoundError:
@@ -416,7 +416,7 @@ def run_agent(project_name: str, project_dir: Path) -> None:
print(f"\nAgent error:\n{stderr_output.strip()}") print(f"\nAgent error:\n{stderr_output.strip()}")
# Still hint about auth if exit was unexpected # Still hint about auth if exit was unexpected
if "error" in stderr_output.lower() or "exception" in stderr_output.lower(): if "error" in stderr_output.lower() or "exception" in stderr_output.lower():
print("\nIf this is an authentication issue, try running: claude login") print("\nIf this is an authentication issue, set ANTHROPIC_API_KEY or try: claude login")
except KeyboardInterrupt: except KeyboardInterrupt:
print("\n\nAgent interrupted. Run again to resume.") print("\n\nAgent interrupted. Run again to resume.")

View File

@@ -25,11 +25,12 @@ echo "[OK] Claude CLI found"
# verify the CLI is installed and remind the user to login if needed # verify the CLI is installed and remind the user to login if needed
if [ -d "$HOME/.claude" ]; then if [ -d "$HOME/.claude" ]; then
echo "[OK] Claude CLI directory found" echo "[OK] Claude CLI directory found"
echo " (If you're not logged in, run: claude login)" echo " (Set ANTHROPIC_API_KEY or run: claude login)"
else else
echo "[!] Claude CLI not configured" echo "[!] Claude CLI not configured"
echo "" echo ""
echo "Please run 'claude login' to authenticate before continuing." echo "Please set ANTHROPIC_API_KEY or run 'claude login' to authenticate."
echo "Note: API key auth is recommended. See README for details."
echo "" echo ""
read -p "Press Enter to continue anyway, or Ctrl+C to exit..." read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
fi fi

View File

@@ -16,16 +16,16 @@ if ! command -v claude &> /dev/null; then
echo " The agent requires Claude CLI to work." echo " The agent requires Claude CLI to work."
echo " Install it from: https://claude.ai/download" echo " Install it from: https://claude.ai/download"
echo "" echo ""
echo " After installing, run: claude login" echo " After installing, set ANTHROPIC_API_KEY or run: claude login"
echo "" echo ""
else else
echo "[OK] Claude CLI found" echo "[OK] Claude CLI found"
# Note: Claude CLI no longer stores credentials in ~/.claude/.credentials.json # Note: Claude CLI no longer stores credentials in ~/.claude/.credentials.json
# We can't reliably check auth status without making an API call # We can't reliably check auth status without making an API call
if [ -d "$HOME/.claude" ]; then if [ -d "$HOME/.claude" ]; then
echo " (If you're not logged in, run: claude login)" echo " (Set ANTHROPIC_API_KEY or run: claude login)"
else else
echo "[!] Claude CLI not configured - run 'claude login' first" echo "[!] Claude CLI not configured - set ANTHROPIC_API_KEY or run 'claude login'"
fi fi
fi fi
echo "" echo ""

View File

@@ -1,5 +1,5 @@
import { useState } from 'react' import { useState } from 'react'
import { Loader2, AlertCircle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react' import { Loader2, AlertCircle, AlertTriangle, Check, Moon, Sun, Eye, EyeOff, ShieldCheck } from 'lucide-react'
import { useSettings, useUpdateSettings, useAvailableModels, useAvailableProviders } from '../hooks/useProjects' import { useSettings, useUpdateSettings, useAvailableModels, useAvailableProviders } from '../hooks/useProjects'
import { useTheme, THEMES } from '../hooks/useTheme' import { useTheme, THEMES } from '../hooks/useTheme'
import type { ProviderInfo } from '../lib/types' import type { ProviderInfo } from '../lib/types'
@@ -21,7 +21,7 @@ interface SettingsModalProps {
} }
const PROVIDER_INFO_TEXT: Record<string, string> = { const PROVIDER_INFO_TEXT: Record<string, string> = {
claude: 'Default provider. Uses your Claude CLI credentials.', claude: 'Default provider. Uses Claude CLI credentials. API key auth is recommended.',
kimi: 'Get an API key at kimi.com', kimi: 'Get an API key at kimi.com',
glm: 'Get an API key at open.bigmodel.cn', glm: 'Get an API key at open.bigmodel.cn',
ollama: 'Run models locally. Install from ollama.com', ollama: 'Run models locally. Install from ollama.com',
@@ -245,6 +245,15 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
{PROVIDER_INFO_TEXT[currentProvider] ?? ''} {PROVIDER_INFO_TEXT[currentProvider] ?? ''}
</p> </p>
{currentProvider === 'claude' && (
<Alert className="border-amber-500/50 bg-amber-50 dark:bg-amber-950/20 mt-2">
<AlertTriangle className="h-4 w-4 text-amber-600" />
<AlertDescription className="text-xs text-amber-700 dark:text-amber-300">
Anthropic's policy may not permit using subscription-based auth (<code className="text-xs">claude login</code>) with third-party agents. Consider using an API key provider or setting the <code className="text-xs">ANTHROPIC_API_KEY</code> environment variable to avoid potential account issues.
</AlertDescription>
</Alert>
)}
{/* Auth Token Field */} {/* Auth Token Field */}
{showAuthField && ( {showAuthField && (
<div className="space-y-2 pt-1"> <div className="space-y-2 pt-1">