Skip to content

docs: cover AI SDK flag and background job polling in CLI#11357

Open
fahe1em1 wants to merge 1 commit intocontinuedev:mainfrom
fahe1em1:codex/continue-10997-cli-ai-sdk-docs
Open

docs: cover AI SDK flag and background job polling in CLI#11357
fahe1em1 wants to merge 1 commit intocontinuedev:mainfrom
fahe1em1:codex/continue-10997-cli-ai-sdk-docs

Conversation

@fahe1em1
Copy link

@fahe1em1 fahe1em1 commented Mar 12, 2026

Description

Partially addresses #10997.

This documents the remaining CLI docs gaps around the CONTINUE_USE_AI_SDK environment variable and the default CheckBackgroundJob flow for backgrounded shell work. It adds an advanced configuration note explaining that the flag routes openai and anthropic providers through Continue's AI SDK adapter, and it adds headless-mode guidance that CheckBackgroundJob stays allow-by-default and can be used to poll background jobs. The change is intentionally small and safe because it only updates two existing docs pages and does not alter runtime behavior.

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

  • npx --yes prettier --check --no-config --tab-width 2 --use-tabs false --trailing-comma all --semi true --single-quote false --bracket-spacing true docs/cli/configuration.mdx docs/cli/headless-mode.mdx
  • printf 'continue\\n' | npx mintlify broken-links (currently fails in the repo on a pre-existing parse error in extensions/cli/BUILD.md, not on these updated pages)

Why this is small and safe

  • This PR only adds documentation for existing CLI behavior.
  • No code paths, configs, or shipped behavior are modified.

Summary by cubic

Adds CLI docs for CONTINUE_USE_AI_SDK and for polling backgrounded shell jobs, addressing gaps from #10997. Setting CONTINUE_USE_AI_SDK=1 routes openai and anthropic via Continue’s Vercel AI SDK adapter; headless mode docs now note that backgrounded commands return a job id and can be polled with CheckBackgroundJob, with read-only helpers allowed by default.

Written for commit ca7b97c. Summary will update on new commits.

@fahe1em1 fahe1em1 requested a review from a team as a code owner March 12, 2026 19:59
@fahe1em1 fahe1em1 requested review from RomneyDa and removed request for a team March 12, 2026 19:59
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 12, 2026
Copy link

@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: ca7b97c6c9

ℹ️ 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".


## Background jobs

If a shell command is moved to the background, Continue returns a job id and the output collected so far. The agent can then call `CheckBackgroundJob("<job-id>")` to fetch the current status, exit code, and accumulated output while the job continues running.

Choose a reason for hiding this comment

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

P2 Badge Clarify headless background-job polling prerequisite

This headless-mode section describes a polling flow that cannot currently be initiated in cn -p runs: Bash only returns a Continue job id when runTerminalCommand receives a backgroundRequested signal, and the only signal source in the repo is the Ctrl+B TUI input handler (extensions/cli/src/ui/hooks/useUserInput.ts). In headless CI usage there is no interactive key handler, so commands cannot be moved into Continue-managed background jobs and users will not get the job id needed for CheckBackgroundJob polling.

Useful? React with 👍 / 👎.

Copy link
Contributor

@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 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant