Skip to content

fix: register sisyphus-junior as builtin agent#2352

Open
rluisr wants to merge 2 commits intocode-yeongyu:devfrom
rluisr:fix/register-sisyphus-junior-as-builtin-agent
Open

fix: register sisyphus-junior as builtin agent#2352
rluisr wants to merge 2 commits intocode-yeongyu:devfrom
rluisr:fix/register-sisyphus-junior-as-builtin-agent

Conversation

@rluisr
Copy link

@rluisr rluisr commented Mar 7, 2026

Summary

Changes

  • src/config/schema/agent-names.ts: Add "sisyphus-junior" to BuiltinAgentNameSchema
  • src/agents/types.ts: Add "sisyphus-junior" to BuiltinAgentName type union
  • src/agents/builtin-agents.ts: Import factory and add to agentSources map (for builtinAgentNames Set correctness)
  • src/agents/builtin-agents/general-agents.ts: Skip in collectPendingBuiltinAgents (handled separately via agent-config-handler.ts, same pattern as atlas)
  • src/agents/index.ts: Add barrel export for createSisyphusJuniorAgentWithOverrides and SISYPHUS_JUNIOR_DEFAULTS
  • src/shared/model-requirements.ts: Add AGENT_MODEL_REQUIREMENTS["sisyphus-junior"] with fallback chain (claude-sonnet-4-6 -> gpt-5.4 -> gemini-3-flash) for model-fallback hook and doctor checks

Testing

bun test src/config/schema.test.ts src/agents/sisyphus-junior/index.test.ts src/tools/delegate-task/tools.test.ts src/tools/delegate-task/category-resolver.test.ts src/plugin-handlers/config-handler.test.ts

All 251 tests pass.

Related Issues

Closes #1697


Summary by cubic

Register sisyphus-junior as a builtin agent so types, exports, and model fallback work consistently across the app. Restores correct fallback behavior and fixes type mismatches (fixes #1697).

  • Bug Fixes
    • Added sisyphus-junior to BuiltinAgentName schema and type.
    • Wired into agentSources and barrel exports.
    • Excluded from collectPendingBuiltinAgents (handled via config handler, like atlas).
    • Defined fallback chain: claude-sonnet-4-6gpt-5.4 (medium) → gemini-3-flash.
    • Updated model-requirements test to expect 11 builtin agents including sisyphus-junior.

Written for commit 123f73c. Summary will update on new commits.

… model fallback

Sisyphus-Junior was missing from BuiltinAgentName type, agentSources map,
barrel exports, and AGENT_MODEL_REQUIREMENTS. This caused type inconsistencies
and prevented model-fallback hooks from working for sisyphus-junior sessions.

Closes code-yeongyu#1697
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@rluisr
Copy link
Author

rluisr commented Mar 7, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 7, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: This PR follows the established pattern for registering builtin agents, adds necessary types and schemas, and passes all relevant tests without altering existing agent logic.

Copy link
Collaborator

@acamq acamq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR correctly adds sisyphus-junior as a builtin agent across the type system and model fallback, but the test suite wasn't updated to reflect this change.

Issue

Test: src/shared/model-requirements.test.ts
Line: 213
Error:

Expected length: 10
Received length: 11

The test "all 10 builtin agents have valid fallbackChain arrays" expects exactly 10 agents, but AGENT_MODEL_REQUIREMENTS now has 11 entries after adding sisyphus-junior.

Fix Required

Update src/shared/model-requirements.test.ts (lines 194-213):

test("all 11 builtin agents have valid fallbackChain arrays", () => {
  // #given - list of 11 agent names
  const expectedAgents = [
    "sisyphus",
    "hephaestus",
    "oracle",
    "librarian",
    "explore",
    "multimodal-looker",
    "prometheus",
    "metis",
    "momus",
    "atlas",
    "sisyphus-junior",  // ← Add this line
  ]

  // when - checking AGENT_MODEL_REQUIREMENTS
  const definedAgents = Object.keys(AGENT_MODEL_REQUIREMENTS)

  // #then - all agents present with valid fallbackChain
  expect(definedAgents).toHaveLength(11)  // ← Change from 10 to 11
  for (const agent of expectedAgents) {
    // ... rest of test unchanged

Changes Summary

  1. Add "sisyphus-junior" to expectedAgents array (line 207)
  2. Change test description from "all 10" to "all 11" (line 194)
  3. Update assertion from toHaveLength(10) to toHaveLength(11) (line 213)

Note: The author mentioned "All 251 tests pass" in the PR description, but CI shows this test failing. Likely a local test vs CI environment difference.

@acamq
Copy link
Collaborator

acamq commented Mar 9, 2026

Once you fix the test, this PR is good to merge.

@rluisr
Copy link
Author

rluisr commented Mar 9, 2026

@acamq fixed

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.

[Bug]: Sisyphus-Junior agent not registered - category delegation fails completely

2 participants