Skip to content

feat: make freshclaude capability-driven#312

Open
danshapiro wants to merge 6 commits intomainfrom
codex/freshclaude-capability-driven
Open

feat: make freshclaude capability-driven#312
danshapiro wants to merge 6 commits intomainfrom
codex/freshclaude-capability-driven

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

  • replace hardcoded FreshClaude model and thinking controls with runtime capability discovery from the server registry
  • keep tracked vs exact model selection, effort validation, stale capability refresh, and settings persistence aligned to discovered provider capabilities
  • preserve valid named resume targets through sdk.create so capability refreshes do not break restoring sessions

Testing

  • npm test
  • npm run test:vitest -- test/e2e/agent-chat-restore-flow.test.tsx test/unit/client/components/agent-chat/AgentChatView.reload.test.tsx --maxWorkers 1
  • npm run test:vitest -- --config vitest.server.config.ts test/server/agent-run.test.ts --maxWorkers 1

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 698876cc2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 474 to +475
createSentRef.current = true
dispatch(registerPendingCreate({
requestId: paneContent.createRequestId,
expectsHistoryHydration: Boolean(paneContent.resumeSessionId),
}))
ws.send({
type: 'sdk.create',
requestId: paneContent.createRequestId,
model: paneContent.model ?? defaultModel,
permissionMode: paneContent.permissionMode ?? defaultPermissionMode,
effort: paneContent.effort ?? defaultEffort,
...(paneContent.initialCwd ? { cwd: paneContent.initialCwd } : {}),
...(paneContent.resumeSessionId ? { resumeSessionId: paneContent.resumeSessionId } : {}),
...(paneContent.plugins ? { plugins: paneContent.plugins } : {}),
})
let cancelled = false
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reset create latch when pre-create validation is canceled

This effect marks createSentRef as true before the async capability fetch/validation finishes, but the cleanup path only flips cancelled and never clears the latch. If dependencies change while validation is in flight (for example settings hydration updates providerSettings, or the user edits model/effort while status is still creating), the rerun exits early on createSentRef.current and sdk.create is never sent, leaving the pane stuck in creating.

Useful? React with 👍 / 👎.

[model, resolvedModelOptions],
)
const resolvedEffortOptions = effortOptions ?? []
const showCapabilityControls = capabilitiesStatus !== 'failed'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep model/effort controls available after capability probe failure

When capability loading fails, this flag hides both model and effort controls. Combined with the new create-time validation (which blocks creation when an effort/exact selection cannot be validated), users with a saved effort override can be unable to recover locally: they can retry probing, but cannot clear the effort/model selection to allow session creation without capabilities.

Useful? React with 👍 / 👎.

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.

1 participant