Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ tmp/
temp/
*.tmp

# Git worktrees
.worktrees/

# Package manager lock files (keep package-lock.json for npm ci in CI/CD)
# package-lock.json - DO NOT IGNORE (needed for npm ci)
yarn.lock
Expand Down
3 changes: 2 additions & 1 deletion packages/autonav/src/adapter/navigator-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ async function initializeLangSmith(): Promise<boolean> {
*/
export interface NavigatorAdapterOptions {
/**
* Claude model to use (defaults to claude-sonnet-4-5)
* Model to use. When omitted, each harness uses its own default
* (claude-sonnet-4-5 for ClaudeCodeHarness; user's configured default for ChibiHarness).
*/
model?: string;

Expand Down
11 changes: 11 additions & 0 deletions packages/autonav/src/harness/chibi-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@ interface ChibiToolServer {
*
* When destroyAfterSecondsInactive is set, it is passed in `flags` so chibi
* registers the TTL on the context entry at touch time.
*
* When `model` is provided it is passed via `config.model` so chibi uses
* that model for the invocation. When omitted chibi falls back to whatever
* model is configured in the user's config.toml (i.e. the user's default).
*/
function buildInput(
command: Record<string, unknown> | string,
context: string,
projectRoot?: string,
home?: string,
destroyAfterSecondsInactive?: number,
model?: string,
): string {
const input: Record<string, unknown> = { command, context };
if (projectRoot) {
Expand All @@ -69,6 +74,9 @@ function buildInput(
if (destroyAfterSecondsInactive !== undefined) {
input.flags = { destroy_after_seconds_inactive: destroyAfterSecondsInactive };
}
if (model) {
input.config = { model };
}
return JSON.stringify(input);
}

Expand Down Expand Up @@ -265,6 +273,7 @@ class ChibiSession implements HarnessSession {
config.cwd,
this.ephemeralHome.homePath,
CONTEXT_TTL_SECONDS,
config.model,
);
try {
runSync(input, { env: this.extraEnv, sandboxConfig: this.sandboxConfig });
Expand All @@ -291,6 +300,8 @@ class ChibiSession implements HarnessSession {
this.contextName,
this.config.cwd,
this.ephemeralHome?.homePath,
undefined,
this.config.model,
);

const { command, args } = wrapCommand("chibi-json", [], this.sandboxConfig);
Expand Down
Loading