Skip to content
Open
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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If a tradeoff is required, choose correctness and robustness over short-term con

## Maintainability

Long term maintainability is a core priority. If you add new functionality, first check if there are shared logic that can be extracted to a separate module. Duplicate logic across mulitple files is a code smell and should be avoided. Don't be afraid to change existing code. Don't take shortcuts by just adding local logic to solve a problem.
Long term maintainability is a core priority. If you add new functionality, first check if there is shared logic that can be extracted to a separate module. Duplicate logic across multiple files is a code smell and should be avoided. Don't be afraid to change existing code. Don't take shortcuts by just adding local logic to solve a problem.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this get to do with the PR?

Copy link
Author

Choose a reason for hiding this comment

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

What does this get to do with the PR?

Sorry for the noise, Those were just small typos I spotted in the docs while working on this. They aren't related to the main logic, just felt like a quick win to fix them here

Copy link
Contributor

Choose a reason for hiding this comment

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

You can leave it as is. I am just a contributor trying to help the maintainers; they should have the final say in that. But I agree with you that it is a small change :)

Copy link
Author

Choose a reason for hiding this comment

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

Appreciate it, I'll leave it in as-is and see what they say. Thanks for the help


## Package Roles

Expand Down
20 changes: 14 additions & 6 deletions apps/server/src/codexAppServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,21 +585,29 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
this.writeMessage(context, { method: "initialized" });
try {
const modelListResponse = await this.sendRequest(context, "model/list", {});
console.log("codex model/list response", modelListResponse);
await Effect.logInfo("codex model/list response", { response: modelListResponse }).pipe(
this.runPromise,
);
} catch (error) {
console.log("codex model/list failed", error);
await Effect.logWarning("codex model/list failed", {
cause: error instanceof Error ? error.message : String(error),
}).pipe(this.runPromise);
}
try {
const accountReadResponse = await this.sendRequest(context, "account/read", {});
console.log("codex account/read response", accountReadResponse);
await Effect.logInfo("codex account/read response", { response: accountReadResponse }).pipe(
this.runPromise,
);
context.account = readCodexAccountSnapshot(accountReadResponse);
console.log("codex subscription status", {
await Effect.logInfo("codex subscription status", {
type: context.account.type,
planType: context.account.planType,
sparkEnabled: context.account.sparkEnabled,
});
}).pipe(this.runPromise);
} catch (error) {
console.log("codex account/read failed", error);
await Effect.logWarning("codex account/read failed", {
cause: error instanceof Error ? error.message : String(error),
}).pipe(this.runPromise);
}

const normalizedModel = resolveCodexModelForAccount(
Expand Down