fix(codex): invoke an inline skill steered into a running turn

This commit is contained in:
paseo-bot[bot]
2026-09-26 19:54:47 +02:00
parent af27e28054
commit 4f5224122a
2 changed files with 49 additions and 1 deletions
@@ -242,6 +242,54 @@ describe("Codex active-turn steering admission", () => {
appServer.assertNoErrors();
});
test("a steer resolves a Codex skill mentioned after prose into app-server skill input", async () => {
const appServer = createFakeCodexAppServer({
"skills/list": () => ({
data: [
{
cwd: "/workspace/project",
skills: [
{
name: "paseo-implement",
description: "Execute an existing Paseo plan.",
path: "/workspace/skills/paseo-implement/SKILL.md",
},
],
errors: [],
},
],
}),
"turn/steer": () => ({ turn: { id: "native-A" } }),
});
const { session, paseoTurnId } = await startPublicSteeringSession(appServer);
await expect(
session.steerActiveTurn!("Then use /paseo-implement to complete it.", {
expectedTurnId: paseoTurnId,
}),
).resolves.toEqual({ status: "accepted" });
const steer = appServer.requests().find((request) => request.method === "turn/steer");
expect(steer?.params).toEqual(
expect.objectContaining({
input: [
{
type: "skill",
name: "paseo-implement",
path: "/workspace/skills/paseo-implement/SKILL.md",
},
{
type: "text",
text: "Then use $paseo-implement to complete it.",
text_elements: [],
},
],
}),
);
await session.close();
appServer.assertNoErrors();
});
test("a clearing steer denies every pending permission through its provider handler", async () => {
const appServer = createFakeCodexAppServer({
"turn/steer": () => ({ turn: { id: "native-A" } }),
@@ -4365,7 +4365,7 @@ export class CodexAppServerAgentSession implements AgentSession {
if (!this.matchesSteerAdmission({ client, threadId, nativeTurnId, foregroundTurnId })) {
return { status: "unavailable" };
}
const input = await this.buildUserInput(prompt);
const input = await this.buildUserInput(await this.attachMentionedSkills(prompt));
if (!this.matchesSteerAdmission({ client, threadId, nativeTurnId, foregroundTurnId })) {
return { status: "unavailable" };
}