Skip to content

fix: Default Chat tab model to sonnet for subscription compatibility (#138) - #139

Merged
vybe merged 1 commit into
Abilityai:mainfrom
webmixgamer:feature/138-chat-model-default
Mar 16, 2026
Merged

vybe merged 1 commit into
Abilityai:mainfrom
webmixgamer:feature/138-chat-model-default

Conversation

@webmixgamer

Copy link
Copy Markdown
Contributor

Summary

  • Chat tab's execute_claude_code() lacked the model="sonnet" default that Issue bug: Task execution ignores terminal model override, fails on subscription-incompatible default model #81 added to execute_headless_task() (Tasks tab)
  • When no model was specified and agent_state.current_model was empty, Claude Code fell back to the agent's settings.json model — which could be incompatible with the subscription, producing a misleading "token expired" error
  • Applied the same defensive default: if neither the request nor agent state has a model, default to "sonnet"

Changes

  • docker/base-image/agent_server/services/claude_code.py — Add model defaulting in execute_claude_code()
  • docs/memory/changelog.md — Add changelog entry
  • docs/memory/feature-flows/parallel-headless-execution.md — Document both code paths now having the fix

Test Plan

  • Existing tests unaffected (fix is inside agent container, not covered by API test suite)
  • Manual verification: Create agent with Claude Max subscription, leave no model set, send message via Chat tab — should work instead of failing with "token expired"
  • Verify Tasks tab still works (unchanged code path)
  • After merge: rebuild base image (./scripts/deploy/build-base-image.sh) and restart agents

Closes #138

🤖 Generated with Claude Code

…bilityai#138)

Apply the same model="sonnet" default from Issue Abilityai#81 (execute_headless_task)
to execute_claude_code() used by the Chat tab. Without this, Claude Code
falls back to the agent's settings.json model which may be incompatible
with the assigned subscription, producing a misleading "token expired" error.

Closes Abilityai#138

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@vybe
vybe merged commit c6af307 into Abilityai:main Mar 16, 2026
vybe pushed a commit that referenced this pull request Jul 22, 2026
…k) + backward-compat regression (#1724)

ent#187 decision: **accept the risk — no kill-switch** for the #183 full-directory
skill packages. The change is strictly additive and backward-compatible, so a
flag is unwarranted (and would be short-lived: Phases 2-3, #139/#178, build on
this contract). Verified in code, not asserted:

- A skill with NO frontmatter → `parse_frontmatter` returns (None, None),
  `extract_contract(None)` yields `user_invocable=True` with empty deps and no
  warnings; it still lists/loads with a first-paragraph description fallback.
- A legacy-synced agent (no `.trinity-skill.json` manifest) → `compute_prune`
  returns nothing without a prior manifest ("no-meta → full inject, no prune —
  safe direction"); the platform only deletes files a prior package injection
  wrote, so an un-managed dir is re-injected, never destroyed.

Deliverables (AC): the backward-compat regression test
(`tests/unit/test_183_skill_packages_backward_compat.py`, 5 cases — both compat
questions + the prune-only-what-we-wrote counterpart) and the release
behavior-change note (`docs/releases/0.8.5.md` pre-cut seed) stating skill
loading changed for all agents. Test + docs only — no behavior change; safe to
land during the v0.8.5 soak (it IS the "skill packages" targeted regression the
release plan calls for).

Related to trinity-enterprise#187 · #183

Co-authored-by: Claude Opus 4.8 <[email protected]>
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: Chat tab fails with misleading 'token expired' error — missing model default from #81 fix

2 participants