Yeachan-Heo/oh-my-codex · error

job_not_input_accepting:no_active_exec_session

job_not_input_accepting:no_active_exec_session

Error message

job_not_input_accepting:no_active_exec_session

What it means

Thrown by injectExecFollowup when no usable active exec session state exists in the given cwd. The library refuses to queue a followup for a directory that has no running (usable) exec session, unless explicitly overridden, because there would be no consumer to deliver the prompt to.

Source

Thrown at src/exec/followup.ts:227

        throw new Error("exec_followup_queue_lock_timeout");
      }
      await sleep(QUEUE_LOCK_RETRY_MS);
    }
  }
}

export async function injectExecFollowup(
  options: InjectExecFollowupOptions,
): Promise<InjectExecFollowupResult> {
  const sessionId = normalizeSessionId(options.sessionId);
  const prompt = normalizePrompt(options.prompt);
  const actor = normalizeActor(options.actor);
  const nowIso = options.nowIso ?? new Date().toISOString();

  const active = await readUsableSessionState(options.cwd);
  const activeUsable = active && isSessionStateUsable(active, options.cwd);
  if (!activeUsable && !options.allowInactiveSession) {
    throw new Error("job_not_input_accepting:no_active_exec_session");
  }
  if (
    activeUsable
    && active.session_id !== sessionId
    && active.native_session_id !== sessionId
    && !options.allowInactiveSession
  ) {
    throw new Error(`job_not_input_accepting:session_mismatch:${active.session_id}`);
  }

  const canonicalSessionId = activeUsable && (active.session_id === sessionId || active.native_session_id === sessionId)
    ? active.session_id
    : sessionId;
  const queuePath = sessionQueuePath(options.cwd, canonicalSessionId);
  const queued: ExecFollowupRecord = {
    id: randomUUID(),
    session_id: canonicalSessionId,
    actor,

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Start (or restart) the exec session in that cwd and retry the injection.
  2. Verify you are running the command from the same directory the session was started in (check for the session state file).
  3. If you intentionally want to queue for a not-currently-active session, pass allowInactiveSession: true (CLI equivalent flag) after confirming the queue will be consumed later.
  4. Check that the session state file exists and is intact; if corrupted, restart the session to regenerate it.

Example fix

// before
await injectExecFollowup(cwd, sessionId, { prompt });

// after
const active = await readUsableSessionState(cwd);
if (!active) throw new Error(`No active exec session in ${cwd}; start one before injecting`);
await injectExecFollowup(cwd, sessionId, { prompt });

// or explicitly allow queueing for an inactive session:
await injectExecFollowup(cwd, sessionId, { prompt, allowInactiveSession: true });
Defensive patterns

Strategy: validation

Validate before calling

const active = await readUsableSessionState(cwd);
if (!active) throw new Error(`no usable exec session in ${cwd}; start one first`);
await injectExecFollowup(cwd, active.session_id, { prompt });

Type guard

function hasActiveSession(active: Awaited<ReturnType<typeof readUsableSessionState>>): boolean {
  return active !== null && active !== undefined && !!active.session_id;
}

Try / catch

try { await injectExecFollowup(cwd, sessionId, { prompt }); }
catch (e) {
  if (e instanceof Error && e.message.includes('no_active_exec_session')) { await startExecSession(cwd); /* then retry */ }
  else throw e;
}

Prevention

When it happens

Trigger: Calling injectExecFollowup in a directory where the exec session ended, crashed, or never started; session state file is missing, corrupted, or fails isSessionStateUsable (e.g. stale/pid-dead session); running the inject CLI from the wrong working directory. Only options.allowInactiveSession suppresses it.

Common situations: Injecting after the exec session already exited; CI job runs inject in a fresh checkout where no session was created; wrong cwd (repo root vs subdirectory) so session state isn't found; state file truncated by a concurrent writer; session process killed leaving dead-pid state.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/95414b670ce93799. Report an issue: GitHub.